tree-optimization/116481 - avoid building function_type[]
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / lambda-generic-local-fn1.C
blob06919c535d85d730b103cb91c47430bc5fcae91e
1 // PR c++/97219
2 // { dg-do compile { target c++14 } }
4 struct B;
6 template <typename T>
7 auto f(T *) {
8   void q(B *, void * = static_cast<T *>(0));
9   return [](auto *p) { q(p); };
12 void q(void *) = delete;
14 int main(void) {
15   B *bp = 0;
16   f(bp)(bp);