// PR c++/93259 // { dg-do compile { target c++11 } } template struct is_same; template struct is_same { }; using Array = int[]; template void bar1(Ts ...) { auto && array = Array{ 1, 2, 3 }; is_same{}; // this fails, deduces array as int (&&) [] } template void bar2() { auto && array = Array{ 1, 2, 3 }; is_same{}; // this fails, deduces array as int (&&) [] } void bar3() { auto && array = Array{ 1, 2, 3 }; is_same{}; // OK } int main() { bar1(1, 2, 3); bar2(); bar3(); }