
17 Mar
2015
17 Mar
'15
10:24 p.m.
AMDG On 03/14/2015 03:51 PM, Peter Dimov wrote:
An example that doesn't use boost::bind is:
int main() { boost::function<void(int, int, int)> f2( &a ); }
This, too, worked before the change and doesn't now.
One of these has to fail: int ref(int&); int rref(int&&); boost::function<void(int)> f1(&ref); boost::function<void(int)> f2(&rref); I don't think there's any strong reason to support one over the other, so it's probably best to allow f1, since it used to be supported before rvalue references. The attached patch should work. I've tested it with msvc 9-12 and gcc 4.8 c++03 and c++11. If no one objects, I'll commit this to develop. In Christ, Steven Watanabe