1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
// { dg-options -std=c++0x } struct B { constexpr operator int() { return 4; } }; template <int I> struct C; template<> struct C<4> { typedef int TP; }; template <class T> struct A { constexpr static B t = B(); C<t>::TP tp; }; A<B> a;