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
/
fn2.C
blob
67e35acc362639d7adc4dc785275477607af9cf9
1
// { dg-options "-std=c++17 -fconcepts" }
2
3
template<typename T>
4
concept bool C() { return __is_class(T); }
5
6
template<typename T>
7
requires C<T>()
8
void f(T x) { }
9
10
// Non-dependent args are checked even in dependent scope.
11
template<typename T>
12
void h(T x) {
13
f(0); // { dg-error "cannot call" }
14
}
15
16
int main() {
17
f(0); // { dg-error "cannot call" }
18
}