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
/
iconv1.C
blob
38a0b17b1f82d76e7ff9988163bad1973a1c57e2
1
// PR c++/67240
2
// { dg-options "-std=c++17 -fconcepts" }
3
4
int foo(int x)
5
{
6
return x;
7
}
8
9
template <typename T>
10
concept bool C1 = requires (T x) {
11
{foo(x)} -> int&;
12
};
13
14
template <typename T>
15
concept bool C2 = requires (T x) {
16
{foo(x)} -> void;
17
};
18
19
static_assert( C1<int> ); // { dg-error "assert" }
20
static_assert( C2<int> ); // { dg-error "assert" }