diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/template/static31.C')
-rw-r--r-- | gcc/testsuite/g++.dg/template/static31.C | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/static31.C b/gcc/testsuite/g++.dg/template/static31.C new file mode 100644 index 000000000..935a8a790 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/static31.C @@ -0,0 +1,19 @@ +// PR c++/32674 + +class C +{ + static const int j = 3; +}; + +template<int> class A +{ + static const int i1; + static const int i2; + static const int i3; + static const int i4; +}; + +template<int N> const int A<N>::i1(C::j); +template<int N> const int A<N>::i2 = C::j; +template<int N> const int A<N>::i3(C::j, 5); // { dg-error "compound expression" } +template<int N> const int A<N>::i4 = (C::j, 7); |