Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/concepts/fn4.C @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 1830386684a0 |
children |
rev | line source |
---|---|
145 | 1 // { dg-do compile { target c++17_only } } |
131 | 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 struct S1 { } s1; | |
11 struct S2 { int n; } s2; | |
12 | |
13 template<C T> void f1(T x) { } | |
14 template<D T> void f1(T x) { } | |
15 | |
16 int main() { | |
17 f1(0); // { dg-error "matching" } | |
18 } |