PR c++/56973, DR 696 - capture constant variables only as needed.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / pr68278.C
blob0336222ba5e950b538a2c8b8898dd555d63ecf84
1 // { dg-do compile { target c++14 } }
3 int main()
5   auto f = []() { return 1; };
7   auto q = [=](auto g) {
8     using type = decltype(g(f()));
9   };
10   q([](int x){ return x; });