#include <iostream>#include <vector>using namespace std; struct test { const int index; private: test(const test&) = delete; // comment out this line and voila.}; int main(int argc, char** argv) { test arg = {1}; return arg.index;}
Standard input is empty
prog.cpp: In function ‘int main(int, char**)’: prog.cpp:13:16: error: could not convert ‘{1}’ from ‘<brace-enclosed initializer list>’ to ‘test’ test arg = {1}; ^
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!