aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/concepts/req20.C
blob: bd6b0f98390c97ee6dc82a210dd9e08edfd1e1b2 (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++17 } }
// { dg-options "-fconcepts" }

template <class T> concept bool C = true;

template <class T>
requires C<typename T::foo>
void f(T t) { }

void f(...);

template <class T>
requires C<T>
void g(T t) { }

int main()
{
  f(42);
  g(42);
}