This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ Patch] PR 70466 ("ICE on invalid code in tree check: expected constructor, have parm_decl in convert_like_real...")


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;
}



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]