Mercurial > hg > CbC > GCC_original
annotate gcc/testsuite/g++.dg/cpp2a/concepts-pr78752-2.C @ 19:2b5abeee2509 default tip
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | |
children |
rev | line source |
---|---|
19 | 1 // { dg-do compile { target c++2a } } |
2 // { dg-additional-options "-fconcepts-ts" } | |
3 | |
4 template <class T, class U> | |
5 concept bool Same = __is_same(T, U); | |
6 | |
7 struct test { | |
8 void func(Same<int>... ints) {} | |
9 }; | |
10 | |
11 void func(Same<int>... ints) {} | |
12 | |
13 int main() | |
14 { | |
15 test t; | |
16 t.func(1, 2, 3); | |
17 func(1, 2, 3); | |
18 | |
19 t.func(1, 2, ""); // { dg-error "no match" } | |
20 func(1, 2, ""); // { dg-error "unsatisfied constraints" } | |
21 } |