diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp1y/var-templ40.C')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp1y/var-templ40.C | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp1y/var-templ40.C b/gcc/testsuite/g++.dg/cpp1y/var-templ40.C new file mode 100644 index 00000000000..0a952c48061 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/var-templ40.C @@ -0,0 +1,9 @@ +// PR c++/66619 +// { dg-do compile { target c++14 } } + +int y; +template<class T> T val1 = y; +auto&& x1 = val1<int&>; + +template<class T> T val2 = 0; +auto&& x2 = val2<int&&>; |