This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ Patch] PR 70466 ("ICE on invalid code in tree check: expected constructor, have parm_decl in convert_like_real...")
- From: Jason Merrill <jason at redhat dot com>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 17 May 2016 14:15:35 -0400
- Subject: Re: [C++ Patch] PR 70466 ("ICE on invalid code in tree check: expected constructor, have parm_decl in convert_like_real...")
- Authentication-results: sourceware.org; auth=none
- References: <573A3D53 dot 8010306 at oracle dot com> <573ADA98 dot 1000702 at oracle dot com>
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;
}