Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/cpp2a/concepts-pr67319.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++/67319 |
2 // { dg-do compile { target c++2a } } | |
3 // { dg-additional-options "-fconcepts-ts" } | |
4 | |
5 template <typename T> | |
6 concept bool Any() | |
7 { | |
8 return requires (T t) { +t; }; | |
9 } | |
10 | |
11 struct my_struct | |
12 { | |
13 template <Any... Args> | |
14 auto sample(Args... args) -> void; | |
15 }; | |
16 | |
17 int main() | |
18 { | |
19 my_struct{}.sample(); | |
20 my_struct{}.sample(0); | |
21 my_struct{}.sample(0, 'a'); | |
22 my_struct{}.sample(nullptr); // { dg-error "" } | |
23 } | |
24 |