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

2011-07-17 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48934 --- Comment #18 from Jonathan Wakely 2011-07-17 16:37:48 UTC --- this is fantastic - thanks!

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

2011-07-17 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48934 Jason Merrill changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|

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

2011-07-16 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48934 --- Comment #16 from Jason Merrill 2011-07-17 02:34:15 UTC --- Author: jason Date: Sun Jul 17 02:34:10 2011 New Revision: 176365 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=176365 Log: PR c++/45329 PR c++/48934 * cp-tree.h

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

2011-05-09 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48934 --- Comment #15 from Jason Merrill 2011-05-09 20:10:23 UTC --- (In reply to comment #11) > If I understand your proposal correctly, we'd get something more like: > > foo.C:blahblah: error: no matching function for call to foo > foo.C:blahblah: n

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

2011-05-09 Thread froydnj at codesourcery dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48934 --- Comment #14 from froydnj at codesourcery dot com 2011-05-09 19:20:49 UTC --- On Mon, May 09, 2011 at 07:16:49PM +, redi at gcc dot gnu.org wrote: > > foo.C:blahblah: error: no matching function for call to foo > > foo.C:blahblah: note: can

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

2011-05-09 Thread froydnj at codesourcery dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48934 --- Comment #11 from froydnj at codesourcery dot com 2011-05-09 18:59:55 UTC --- On Mon, May 09, 2011 at 06:26:44PM +, jason at gcc dot gnu.org wrote: > > The hackish way of doing this would be to notice during deduction that > > substitution

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

2011-05-09 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48934 --- Comment #13 from Jonathan Wakely 2011-05-09 19:16:39 UTC --- (In reply to comment #12) > > This PR is really just to get *anything* printed, so just a basic "substition > failed" with no mention of which template parameter failed would be en

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

2011-05-09 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48934 --- Comment #12 from Jonathan Wakely 2011-05-09 19:13:45 UTC --- (In reply to comment #11) > > foo.C:blahblah: error: no matching function for call to foo > foo.C:blahblah: note: candidate is foo(blahblah) > foo.c:blahblah: note: substitution

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

2011-05-09 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48934 --- Comment #10 from Jason Merrill 2011-05-09 18:17:17 UTC --- (In reply to comment #9) > The hackish way of doing this would be to notice during deduction that > substitution of a function type failed, then go back and substitute piece-wise > in

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

2011-05-09 Thread froydnj at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48934 Nathan Froyd changed: What|Removed |Added CC||jason at gcc dot gnu.org --- Comment #9 fr

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

2011-05-09 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48934 --- Comment #8 from Jonathan Wakely 2011-05-09 16:28:51 UTC --- The point of that example is that even clang's "substitution failed" could be improved, because T is substituted successfully into the return type "S1::type" but not into the paramet

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

2011-05-09 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48934 --- Comment #7 from Jonathan Wakely 2011-05-09 16:24:51 UTC --- (In reply to comment #6) Oops, no, that's a mistake, the parameter should be named 't' template struct S1 { typedef char type; }; template typename S1::type foo(typena

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

2011-05-09 Thread froydnj at codesourcery dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48934 --- Comment #6 from froydnj at codesourcery dot com 2011-05-09 16:10:51 UTC --- On Mon, May 09, 2011 at 02:08:05PM +, redi at gcc dot gnu.org wrote: > template struct S1 { typedef char type; }; > > template > typename S1::type > f

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

2011-05-09 Thread froydnj at codesourcery dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48934 --- Comment #5 from 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 struct S1 { typedef char ty

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

2011-05-09 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48934 --- Comment #4 from Jonathan Wakely 2011-05-09 14:05:06 UTC --- Another example: template struct S1 { typedef char type; }; template typename S1::type foo(typename S1::typo) { return t; } char c = foo(1); Here the return typ

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

2011-05-09 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48934 --- Comment #3 from Jonathan Wakely 2011-05-09 12:18:12 UTC --- That patch makes no difference for the example in this PR

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

2011-05-09 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48934 --- Comment #2 from Jonathan Wakely 2011-05-09 12:03:48 UTC --- I forgot about that mail - I'll try the patch and get back to you, thanks

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

2011-05-09 Thread froydnj at codesourcery dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48934 --- Comment #1 from froydnj at codesourcery dot com 2011-05-09 11:53:58 UTC --- On Mon, May 09, 2011 at 11:39:35AM +, redi at gcc dot gnu.org wrote: > int foo(int); > > template > struct sfinae > { }; > > template<> > struct sfinae >