Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

almost 7 years ago

Language

C++

Compiler

gcc HEAD 9.0.0 20180827 (experimental)

Options
Warnings
Boost 1.68.0
C++17
-pedantic

Author

anonymous

almost 7 years ago

$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.68.0/gcc-head/include -std=c++17 -pedantic
prog.cc: In function 'int main()':
prog.cc:11:18: error: use of deleted function 'A::A()'
11 |     A* a = new A(); // doesnt compile
   |                  ^
prog.cc:7:5: note: declared here
7 |     A() = delete;
  |     ^
prog.cc:12:9: error: use of deleted function 'A::~A()'
12 |     A b{}; // doesn't compile
   |         ^
prog.cc:6:5: note: declared here
6 |     ~A() = delete;
  |     ^
prog.cc:13:7: error: use of deleted function 'A::A()'
13 |     A c; // doesn't compile
   |       ^
prog.cc:7:5: note: declared here
7 |     A() = delete;
  |     ^
prog.cc:13:7: error: use of deleted function 'A::~A()'
13 |     A c; // doesn't compile
   |       ^
prog.cc:6:5: note: declared here
6 |     ~A() = delete;
  |     ^
prog.cc:11:8: warning: unused variable 'a' [-Wunused-variable]
11 |     A* a = new A(); // doesnt compile
   |        ^
Exit Code:
1