// Testcase for deduction of std::initializer_list for auto. // { dg-do run } // { dg-options "-std=c++0x" } #include #include extern "C" void abort(); template void f (T t) { auto ilt = { &t, &t }; if (typeid(ilt) != typeid(std::initializer_list)) abort(); auto il = { 1, 2, 3 }; if (typeid(il) != typeid(std::initializer_list)) abort(); } int main() { auto il = { 1, 2, 3 }; if (typeid(il) != typeid(std::initializer_list)) abort(); f('c'); }