blob: 3cb525ec25cef7977805b7588177eaf9aa2bb3ab (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
// { dg-do compile { target c++20 } }
// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
#include <cassert>
template<typename T>
concept C = __is_class(T);
template<typename T>
concept D = C<T> && __is_empty(T);
struct X { } x;
struct Y { int n; } y;
int called = 0;
template<typename T>
struct S {
void f() requires C<T>;
};
template<> void S<int>::f() { called = 1; } // { dg-error "match" }
|