repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
* doc/invoke.texi: Document -std=c++17 and -std=gnu++17 and document
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
concepts
/
intro1.C
blob
ac8a708b107924eaa4092684ee2bd955c7e13de7
1
// { dg-options "-std=c++17 -fconcepts" }
2
3
template<typename T>
4
concept bool C = __is_class(T);
5
6
C{T} void f1();
7
8
struct S1
9
{
10
C{T} void f2();
11
C{T} static void f3();
12
};
13
14
int main()
15
{
16
S1 s;
17
18
f1<S1>();
19
s.f2<S1>();
20
S1::f3<S1>();
21
22
return 0;
23
}
24
25
template<typename T>
26
void f1() requires C<T>
27
{
28
}
29
30
template<typename T>
31
void S1::f2() requires C<T>
32
{
33
}
34
35
template<typename T>
36
void S1::f3() requires C<T>
37
{
38
}