summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1y/var-templ14.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp1y/var-templ14.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/var-templ14.C15
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 0000000000..c3c50d1266
--- /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>, "");