blob: e34c606e3d6adcd1248ee2c41dd984f1c4df486d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// { dg-options "-std=c++17 -fconcepts" }
template<typename T>
concept bool C() { return __is_class(T); }
template<typename T>
concept bool D() { return C<T>() and __is_empty(T); }
template<template<typename Q> requires C<Q>() class X>
struct S { };
template<typename A> requires true struct T0 { };
template<typename A> requires D<A>() struct T1 { };
S<T0> x3; // { dg-error "constraint mismatch|invalid type" }
S<T1> x4; // { dg-error "constraint mismatch|invalid type" }
int main() { }
|