This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/48934] no rejection reason given for SFINAE
- From: "froydnj at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 9 May 2011 15:48:49 +0000
- Subject: [Bug c++/48934] no rejection reason given for SFINAE
- Auto-submitted: auto-generated
- References: <bug-48934-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48934
--- Comment #5 from froydnj at codesourcery dot com <froydnj at codesourcery dot com> 2011-05-09 15:38:14 UTC ---
Thanks for checking. I'll attempt to the make the patch do something
intelligent on at least the original testcase and this:
> template<typename T> struct S1 { typedef char type; };
>
> template<typename T>
> typename S1<T>::type
> foo(typename S1<T>::typo)
> { return t; }
>
> char c = foo<int>(1);
>
> Here the return type is valid, but the parameter is not ("typo" vs "type").
> Ideally the diagnostic would indicate that, which would help when the template
> arguments are substituted in more than one place.
Thanks for the additional testcases!
> I realise that might be very difficult to do and that as a library implementor
> my wishlist may not be typical of most users. Simply saying something like
> "substitution failed" would already be a nice improvement.
"substitution failed" will probably be the default message if we can't
provided anything more intelligent.