[Bug c++/49229] [C++0x][SFINAE] ICE with variadics and depending non-type default parameter

2011-06-16 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49229

--- Comment #3 from Jason Merrill jason at gcc dot gnu.org 2011-06-16 
22:09:08 UTC ---
Author: jason
Date: Thu Jun 16 22:09:05 2011
New Revision: 175120

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=175120
Log:
PR c++/49229
* pt.c (tsubst_decl) [FUNCTION_DECL]: Handle substitution failure.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/sfinae26.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog


[Bug c++/49229] [C++0x][SFINAE] ICE with variadics and depending non-type default parameter

2011-06-16 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49229

--- Comment #4 from Jason Merrill jason at gcc dot gnu.org 2011-06-17 
01:06:52 UTC ---
Author: jason
Date: Fri Jun 17 01:06:50 2011
New Revision: 175131

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=175131
Log:
PR c++/49229
* pt.c (tsubst_decl) [FUNCTION_DECL]: Handle substitution failure.

Added:
branches/gcc-4_6-branch/gcc/testsuite/g++.dg/cpp0x/sfinae26.C
Modified:
branches/gcc-4_6-branch/gcc/cp/ChangeLog
branches/gcc-4_6-branch/gcc/cp/pt.c
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog


[Bug c++/49229] [C++0x][SFINAE] ICE with variadics and depending non-type default parameter

2011-06-16 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49229

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.6.1

--- Comment #5 from Jason Merrill jason at gcc dot gnu.org 2011-06-17 
01:07:26 UTC ---
Fixed for 4.6.1.


[Bug c++/49229] [C++0x][SFINAE] ICE with variadics and depending non-type default parameter

2011-06-15 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49229

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2011.06.15 17:39:59
 CC||jason at gcc dot gnu.org
 AssignedTo|unassigned at gcc dot   |jason at gcc dot gnu.org
   |gnu.org |
 Ever Confirmed|0   |1


[Bug c++/49229] [C++0x][SFINAE] ICE with variadics and depending non-type default parameter

2011-05-30 Thread daniel.kruegler at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49229

Daniel Krügler daniel.kruegler at googlemail dot com changed:

   What|Removed |Added

 CC||paolo.carlini at oracle dot
   ||com

--- Comment #1 from Daniel Krügler daniel.kruegler at googlemail dot com 
2011-05-30 11:26:28 UTC ---
[Possibly of interest for Paolo as well]

Some observations: Other binary traits that do not lead to a degenerate
specialization as is_same does, do not produce this ICE. E.g. given

templateclass, class
struct is_blubb {
  static constexpr bool value = false;
};

template
struct is_blubbbool, bool {
  static constexpr bool value = true;
};

and a constrained c'tor of S like this

templateclass... T
struct S {
  templateclass... U,
typename enable_ifand_is_blubbT, U...::value::type* = enabler
  
  S(U...){}
};

Sbool s(0);

As expected, this program is rejected as expected, but does not produce an ICE.


[Bug c++/49229] [C++0x][SFINAE] ICE with variadics and depending non-type default parameter

2011-05-30 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49229

--- Comment #2 from Paolo Carlini paolo.carlini at oracle dot com 2011-05-30 
11:33:31 UTC ---
Thanks for your further investigation of these issues, Daniel. I'm not sure to
understand what you mean by degenerate specialization, though. In my
experience, a binary trait like is_convertible for example also doesn't work
(actually, in the PR I picked is_same only for its simplicity)