diff options
Diffstat (limited to 'gcc/testsuite/g++.dg')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp1y/var-templ14.C | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp1y/var-templ14.C b/gcc/testsuite/g++.dg/cpp1y/var-templ14.C new file mode 100644 index 00000000000..c3c50d1266c --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/var-templ14.C @@ -0,0 +1,15 @@ +// PR c++/63528 +// { dg-do compile { target c++14 } } + +template<class...> +struct X +{ + constexpr static bool value = true; +}; + +static_assert(X<int>::value, ""); + +template <class... Args> +constexpr bool X_v = X<Args...>::value; + +static_assert(X_v<int>, ""); |