diff options
Diffstat (limited to 'clang/test/SemaTemplate/concepts.cpp')
-rw-r--r-- | clang/test/SemaTemplate/concepts.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/concepts.cpp b/clang/test/SemaTemplate/concepts.cpp index a54bc02..5b0f3d3 100644 --- a/clang/test/SemaTemplate/concepts.cpp +++ b/clang/test/SemaTemplate/concepts.cpp @@ -1441,6 +1441,24 @@ void main() { Feeder<int>{}.feed<Cat<int>>(); } } +namespace case9 { + +template <typename> +concept a = requires { requires true; }; +template <typename T> +concept b = a<typename T::EntitySpec>; +template <typename T> +concept c = requires { b<T>; }; +template <typename T> + requires c<T> +struct s; +template <typename> constexpr bool f() { return true; } +template <typename T> constexpr bool d = f<T>(); +struct s2; +static_assert(d<s<s2>>); + +} + } namespace GH162125 { |