summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/instantiate-requires-clause.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaTemplate/instantiate-requires-clause.cpp')
-rw-r--r--clang/test/SemaTemplate/instantiate-requires-clause.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/instantiate-requires-clause.cpp b/clang/test/SemaTemplate/instantiate-requires-clause.cpp
index 04b595717e6..3b7dc3ddd74 100644
--- a/clang/test/SemaTemplate/instantiate-requires-clause.cpp
+++ b/clang/test/SemaTemplate/instantiate-requires-clause.cpp
@@ -39,3 +39,15 @@ struct S {
};
static_assert(S<void>::f(1));
+
+constexpr auto value = 0;
+
+template<typename T>
+struct S2 {
+ template<typename = void> requires(value, true)
+ static constexpr auto f() requires(value, true) {
+ }
+};
+
+static_assert((S2<int>::f(), true));
+
OpenPOWER on IntegriCloud