Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/lambda-targ22.C

raw
1 // PR c++/123665
2 // { dg-do compile { target c++20 } }
3
4 template<class T, class V = decltype([](auto){ return 42; })>
5 struct A { using type = V; };
6
7 template<class T>
8 auto f() {
9 return [](auto) {
10 return typename A<T*>::type{}(true);
11 }(0);
12 }
13
14 using type = decltype(f<void>());
15 using type = int;