[Bug c++/59550] New: compiler crash when forming a pointer to a reference would be needed in std::initalizer_list
ali.baharev at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Dec 18 19:58:00 GMT 2013
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
More information about the Gcc-bugs
mailing list