aboutsummaryrefslogtreecommitdiff
path: root/clang/test/SemaTemplate
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaTemplate')
-rw-r--r--clang/test/SemaTemplate/concepts.cpp25
-rw-r--r--clang/test/SemaTemplate/cxx1z-decomposition.cpp2
2 files changed, 26 insertions, 1 deletions
diff --git a/clang/test/SemaTemplate/concepts.cpp b/clang/test/SemaTemplate/concepts.cpp
index 3fbe7c0..aaa20f6 100644
--- a/clang/test/SemaTemplate/concepts.cpp
+++ b/clang/test/SemaTemplate/concepts.cpp
@@ -1416,6 +1416,31 @@ concept IsEntitySpec =
}
+namespace case8 {
+
+template <class T>
+struct type_identity {
+ using type = T;
+};
+
+template <typename Inner>
+struct Cat {};
+
+template <typename T>
+concept CatConcept = requires {
+ []<class Inner>(type_identity<Cat<Inner>>) {}(type_identity<T>{});
+};
+
+template <typename Dummy>
+struct Feeder {
+ template <CatConcept Dummy2>
+ void feed() noexcept {}
+};
+
+void main() { Feeder<int>{}.feed<Cat<int>>(); }
+
+}
+
}
namespace GH162125 {
diff --git a/clang/test/SemaTemplate/cxx1z-decomposition.cpp b/clang/test/SemaTemplate/cxx1z-decomposition.cpp
index 779c4cf..b0cc4e6 100644
--- a/clang/test/SemaTemplate/cxx1z-decomposition.cpp
+++ b/clang/test/SemaTemplate/cxx1z-decomposition.cpp
@@ -15,7 +15,7 @@ namespace std {
template<> struct std::tuple_size<C> { enum { value = 2 }; };
template<typename T> int decomp(T &t) {
- auto &[a, b] = t; // expected-error {{type 'D' decomposes into 3 elements, but only 2 names were provided}}
+ auto &[a, b] = t; // expected-error {{type 'D' binds to 3 elements, but only 2 names were provided}}
return a + b; // expected-error {{cannot initialize return object of type 'int' with an rvalue of type 'int *'}}
}