diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/template/static12.C')
-rw-r--r-- | gcc/testsuite/g++.dg/template/static12.C | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/static12.C b/gcc/testsuite/g++.dg/template/static12.C new file mode 100644 index 000000000..73becab27 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/static12.C @@ -0,0 +1,13 @@ +// PR c++/18470 + +template<typename> struct A +{ + static const int i=1; +}; + +template<typename T> struct B : A<T> +{ + using A<T>::i; + char s[i]; // fails + char t[A<T>::i]; // compiles +}; |