This is the mail archive of the gcc-bugs@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]

[Bug c++/48934] no rejection reason given for SFINAE


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.


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