Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/cpp2a/concepts-return-req1.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
rev | line source |
---|---|
145 | 1 // PR c++/92268 |
2 // { dg-do compile { target c++2a } } | |
3 | |
4 template <class T> concept Two = true; | |
5 template <class T> concept One = Two<typename T::type>; | |
6 template <class T> concept Zero = requires | |
7 { | |
8 { T() } -> One; | |
9 }; | |
10 | |
11 template <class T> | |
12 void f() requires Zero<T>; | |
13 template <class T> | |
14 int f(...); | |
15 | |
16 int main() | |
17 { | |
18 f<int>(); | |
19 } |