g++ 2.95.2 bug
Martin Sebor
sebor@roguewave.com
Wed Dec 1 09:51:00 GMT 1999
This is a report of a g++ 2.95.2 bug. The code below is illegal (see
14.7.3, p5) and should not compile. It does with g++ 2.95.2.
Thank you
Martin
template<class T> struct A {
void f(T) { /* ... */ }
static const bool b = false;
};
template<> struct A<int> {
void f(int);
static const bool b;
};
// explicit specialization syntax not used for a member of
// explicitly specialized class template specialization
void A<int>::f(int) { /* ... */ }
template<> const bool A<int>::b = true; // <-- error
==============================================
Martin Sebor, Lead Software Engineer
C++ Standards Group, Rogue Wave Software, Inc.
sebor@roguewave.com (303) 545-3287
More information about the Gcc-bugs
mailing list