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

template<typename T>
struct S {
  using type = T::type; // { dg-bogus "" }
};

template<typename T>
auto f() {
  return [] <typename U> (U) {
    // Verify that partial instantiation of this generic lambda doesn't cause
    // these requirements to get checked out of order.
    static_assert(!requires { typename U::type; typename S<T>::type; });
    return 0;
  };
}

int a = f<int>()(0);