1 // { dg-do compile { target c++17 } } 2 // { dg-options "-fconcepts" } 3 4 template<typename T> C()5 concept bool C() { return __is_class(T); } 6 7 template<typename T> D()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 template<typename A> requires true struct T0 { }; 14 template<typename A> requires D<A>() struct T1 { }; 15 16 S<T0> x3; // { dg-error "constraint mismatch|invalid type" } 17 S<T1> x4; // { dg-error "constraint mismatch|invalid type" } 18 main()19int main() { } 20