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]

[C++] member template partial specialization ICE



Recent (since 2.95.2) regression. This used to error out. Now it just dies.

-benjamin



template<typename T1>
class test 
{
 public:
  template<typename T2>
    void foo(T2 val);
};


// Specialized method

// declare member template partial specialization
template<> template<typename T2>
void test<unsigned char>::foo(T2 val);

// define member template partial specialization
template<> template<typename T2>
void test<unsigned char>::foo(T2 val) { }

// 14.7.3 explicit specialization p 16
// member template explicit specialization (T2 deduced as int)
template<> template<>
void test<unsigned char>::foo(int val) { } 

// member template explicit specialization (T2 specified as short)
template<> template<>
void test<unsigned char>::foo<short>(short val) { } 

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