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++/11489] [3.4 Regression] ICE/segfault on legal code


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11489



------- Additional Comments From neroden at gcc dot gnu dot org  2003-07-12 20:45 -------
I cut the testcase down to this:
template< bool B , typename T1 > struct if_c {};

template< typename C , typename T2 > struct foo
{
  typedef
    if_c<
      static_cast<bool>(C::value)
      ,
      T2
        >
    almost_type_;
};

This seems to be the line on which it's failing:
static_cast<bool>(C::value) 

What is this supposed to mean, anyway?  C is a *typename*.  I assume 'value' has to be something which is the same for all instances of the type? 
(How would that be done anyway?)  :-/  Is this code even valid?


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