aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/concepts-pr78752-2.C
blob: af2fb8aa02f6faa3b2c9c111e4504f59d8777030 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// { dg-do compile { target c++20 } }
// { dg-additional-options "-fconcepts" }

template <class T, class U>
concept Same = __is_same(T, U);

struct test {
  void func(Same<int> auto... ints) {}
};

void func(Same<int> auto... ints) {}

int main()
{
  test t;
  t.func(1, 2, 3);
  func(1, 2, 3);

  t.func(1, 2, ""); // { dg-error "no match" }
  func(1, 2, ""); // { dg-error "no match" }
}