[Bug c++/62255] [4.8/4.9 Regression] Introducing an unrelated template parameter causes compilation to fail
jason at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Sep 6 03:45:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62255
--- Comment #8 from Jason Merrill <jason at gcc dot gnu.org> ---
And here's a reduced testcase that GCC and EDG reject, but clang accepts.
template <typename T> struct Test {
template <typename X> static void check(typename X::Undefined *);
template <typename> static int &check(...);
static const int value = sizeof (check<T>());
};
template <int> struct Sink { };
template <typename T> struct Base : Sink<Test<T>::value> {};
template <typename T> class Derived : Base<Derived<T> > {};
int i[Test<Derived<int> >::value];
More information about the Gcc-bugs
mailing list