http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59550
Bug ID: 59550 Summary: compiler crash when forming a pointer to a reference would be needed in std::initalizer_list Product: gcc Version: 4.8.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ali.baharev at gmail dot com Code: #include <fstream> #include <initializer_list> using namespace std; void writeSomething(initializer_list<ofstream&> args) { for (auto f : args ) f << "hello" << endl; } int main() { ofstream outputFile("data_1.txt"); writeSomething({outputFile}); } Online demonstration: http://ideone.com/vTHDFy This code came up at http://stackoverflow.com/q/20665699/341970