fork download
  1. struct S
  2. {
  3. S(int x) {}
  4. private:
  5. S(S const &);
  6. };
  7.  
  8. int main() {
  9. S s1 = 3;
  10. return 0;
  11. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:5:2: error: ‘S::S(const S&)’ is private
  S(S const &);
  ^
prog.cpp:9:9: error: within this context
  S s1 = 3;
         ^
stdout
Standard output is empty