Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/constexpr-static5.C

raw
1 // { dg-do compile { target c++11 } }
2
3 template <class T>
4 struct A
5 {
6 constexpr static T t = T(); // { dg-error "literal" }
7 };
8 template <class T>
9 constexpr T A<T>::t;
10
11 struct B
12 {
13 ~B();
14 };
15
16 B b = A<B>::t;
17