mirror of
https://forge.sourceware.org/marek/gcc.git
synced 2026-02-22 12:00:11 -05:00
2017-10-04 Paolo Carlini <paolo.carlini@oracle.com> PR c++/78816 * g++.dg/cpp1y/lambda-generic-variadic6.C: New. From-SVN: r253397
20 lines
295 B
C
20 lines
295 B
C
// PR c++/78816
|
|
// { dg-do compile { target c++14 } }
|
|
|
|
void f(void (*f1)(int)) {
|
|
f1(42);
|
|
}
|
|
|
|
template <typename Lambda>
|
|
static auto callback(Lambda &&l)
|
|
{
|
|
static auto* p = &l;
|
|
p = &l;
|
|
return [](auto... x){ return (*p)(x...); };
|
|
}
|
|
|
|
int main() {
|
|
int x = 5;
|
|
f(callback([=](int y){}));
|
|
}
|