gcc/testsuite/g++.dg/cpp2a/concepts-pr78752-2.C
raw| 1 | // { dg-do compile { target c++20 } } |
| 2 | // { dg-additional-options "-fconcepts" } |
| 3 | |
| 4 | template <class T, class U> |
| 5 | concept Same = __is_same(T, U); |
| 6 | |
| 7 | struct test { |
| 8 | void func(Same<int> auto... ints) {} |
| 9 | }; |
| 10 | |
| 11 | void func(Same<int> auto... 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 "no match" } |
| 21 | } |