131
|
1 // { dg-do compile { target c++17 } }
|
|
2 // { dg-options "-fconcepts" }
|
111
|
3
|
|
4 template<typename T>
|
|
5 concept bool C() { return __is_class(T); }
|
|
6
|
|
7 template<typename T>
|
|
8 concept bool D() { return C<T>() and __is_empty(T); }
|
|
9
|
|
10 template<template<typename Q> requires C<Q>() class X>
|
|
11 struct S { };
|
|
12
|
|
13 // An unconstrained template can be used as an argument for any
|
|
14 // constrained template template parameter.
|
|
15 template<typename A> struct T0 { };
|
|
16 S<T0> x1;
|
|
17
|
|
18 // Matching constraints are valid.
|
|
19 template<typename A> requires C<A>() struct T1 { };
|
|
20 S<T1> x2;
|
|
21
|
|
22 int main() { }
|