On 05/17/2016 04:47 AM, Paolo Carlini wrote:
... alternately, if the substance of my patchlet is right, we could simplify a bit the logic per the below.
Here's a well-formed variant that was accepted by 4.5. Does your patch fix it? I also think with your patch we can drop the C++11 check, since list-initialization doesn't exist in C++98.
template < class T, class S > struct A { explicit A (...) {} }; template < class T, class S > A < T, S > foo (T (S::*f) ()) { return A < T, S > (f); } struct B { void bar () {} }; int main () { foo (&B::bar); return 0; }