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
[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
concepts
/
fn1.C
blob
800a0d36f0b948b3a30a25cf9c6420f7f8791ef9
1
// { dg-options "-std=c++17 -fconcepts" }
2
3
template<typename T>
4
concept bool C() { return __is_class(T); }
5
6
struct S { } s;
7
8
template<typename T>
9
requires C<T>()
10
void f(T x) { }
11
12
// Calls are valid when arguments are dependent,
13
template<typename T>
14
void g(T x) { f(x); }
15
16
// Calls are checked when arguments are non-dependent.
17
template<typename T>
18
void h(T x) {
19
f(s);
20
}
21
22
int main() {
23
f(s);
24
g(s);
25
}