diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/template/const5.C')
-rw-r--r-- | gcc/testsuite/g++.dg/template/const5.C | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/const5.C b/gcc/testsuite/g++.dg/template/const5.C new file mode 100644 index 000000000..5d3ec5b1c --- /dev/null +++ b/gcc/testsuite/g++.dg/template/const5.C @@ -0,0 +1,12 @@ +// PR c++/49176 +// { dg-options -std=c++0x } + +struct A { static int a(); }; + +template<int> +struct B { static int const b; }; + +int f() { return B<0>::b; } + +template<int I> +int const B<I>::b=A::a(); |