[Bug c++/51501] decltype over-agressive SFINAE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51501 --- Comment #7 from Jason Merrill jason at gcc dot gnu.org 2012-12-15 04:08:09 UTC --- This is core issue 1433, classified as an extension in Kona. I don't know if EWG has taken a look at it yet.
[Bug c++/51501] decltype over-agressive SFINAE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51501 --- Comment #6 from Dave Abrahams dave at boostpro dot com 2012-08-18 23:18:21 UTC --- Jason, are you submitting (or is there already) an issue for this?
[Bug c++/51501] decltype over-agressive SFINAE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51501 Jason Merrill jason at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2011-12-19 CC||jason at gcc dot gnu.org AssignedTo|unassigned at gcc dot |jason at gcc dot gnu.org |gnu.org | Ever Confirmed|0 |1 --- Comment #4 from Jason Merrill jason at gcc dot gnu.org 2011-12-19 21:51:21 UTC --- Reduced: template class T T list(T x); template class H, class ...T auto list(H h, T ...args) - decltype(list(args...)); auto list3 = list(1, 2, 3);
[Bug c++/51501] decltype over-agressive SFINAE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51501 Jason Merrill jason at gcc dot gnu.org changed: What|Removed |Added Status|ASSIGNED|SUSPENDED --- Comment #5 from Jason Merrill jason at gcc dot gnu.org 2011-12-19 22:06:03 UTC --- The problem here is that the variadic 'list' is not in scope when the trailing-return-type is parsed. 3.3.2 says, The point of declaration for a name is immediately after its complete declarator and the declarator includes the trailing-return-type. And then since all the arguments are integers, no argument-dependent lookup is done, so the call in the trailing-return-type doesn't find the right template, and fails. The versions of EDG and Clang that I have handy seem to reject this testcase on the same basis. This seems like a flaw in the standard.
[Bug c++/51501] decltype over-agressive SFINAE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51501 Marc Glisse marc.glisse at normalesup dot org changed: What|Removed |Added CC||marc.glisse at normalesup ||dot org --- Comment #2 from Marc Glisse marc.glisse at normalesup dot org 2011-12-11 09:41:00 UTC --- Could this be related to Bug 45873?
[Bug c++/51501] decltype over-agressive SFINAE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51501 --- Comment #3 from Dave Abrahams dave at boostpro dot com 2011-12-11 10:32:25 UTC --- (In reply to comment #2) Could this be related to Bug 45873? Not if your explanation in http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45873#c2 is correct, I think. This is a straightforward pack expansion with no change in the number of arguments.
[Bug c++/51501] decltype over-agressive SFINAE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51501 --- Comment #1 from Dave Abrahams dave at boostpro dot com 2011-12-10 21:06:14 UTC --- Created attachment 26045 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=26045 test case compile with -std=c++11 to see the failure. Additionally add -DWORKAROUND to demonstrate why it ought to work.