Why don't you report it to Microsoft Connect?
And if you do report it, would you mind posting the link? I wouldn't mind tracking it to see what they say.
Sure thing. http://connect.microsoft.com/VisualStudio/feedback/details/763571/msvs-2012-c-std-bind-illegal-indirection-compiler-error
If this is your actual code, you should call std::mem_fn and not std::bind since you aren't binding anything, mem_fn will give you a callable object which takes either a pointer or reference to the object as it's first parameter. That said, I can't find any reason why it shouldn't work. If you explicitly handle the conversion yourself using mem_fn, it also works
You're right - that was one thing that I tried early on and it does work properly. It's probably the appropriate solution if we want to be as correct as possible. It also appears that the issue goes away if we do in fact use bind appropriately (we actually bind something) like so:
virtual void ObjectBase::vfunc_parm(int i) const { }
void ObjectDerived::vfunc_parm(int i) const { std::cout << "vfunc_parm i = " << i << std::endl;}
const ObjectDerived obj;
auto func = std::bind(&ObjectBase::vfunc_parm, _1, _2);
func(obj, 2);
The only downside is that this is a problem in many thousands of locations and determining in each location the appropriate solution will be a tedious process; even if it does make our code base better overall.
It's as much a matter of curiosity for me at this point anyways. Conceptually I don't understand why the original code wouldn't work, even if it's not technically the best solution.