aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/concepts/pr66091.C
blob: ee9d1150fdbf70636146741d64a04dd1c83e1865 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// { dg-options "-std=c++1z" }

template<typename T>
concept bool C1()
{
  return requires() { typename T::type1; };
}

template<typename T>
concept bool C2()
{
  return C1<T>() && requires() { typename T::type2; };
}

template<C1 T>
struct S {
  S& operator++() { return *this; }
  S& operator++() requires C2<T>() { return *this; }
};