aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1z/constexpr-if35.C
blob: b1248fe23e8e22c5101ce448a3603fe1ef5adfc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// PR c++/101764
// { dg-do compile { target c++17 } }

void g(...);

template<class>
auto f() {
  return [](auto... ts) {
    g([] { if constexpr (sizeof(ts)); }...);
#if __cpp_concepts
    g(requires { decltype(ts){0}; }...);
#endif
  };
}

int main() {
  f<int>()('a', true);
}