tree-optimization/116481 - avoid building function_type[]
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / lambda-generic-variadic9.C
blob1b3a6442efdfd00764e0bfe1828d6ca349a78598
1 // PR c++/84126
2 // { dg-do compile { target c++14 } }
4 template <class... Ts>
5 void sink(Ts...);
7 template <typename T>
8 int bar(T&); // ICE with reference, work with just T
10 template <typename T >
11 void foo(T){
12   [](auto ... k){
13     sink (bar(k) ...);
14   }(0);
17 int main() {
18   foo(0);