Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

almost 3 years ago

Language

C++

Compiler

gcc 11.1.0

Options
Warnings
Optimization
Boost 1.79.0
C++11
-pedantic
Raw compiler options
-fno-elide-constructors

Author

anonymous

almost 3 years ago

$ g++ prog.cc -Wall -Wextra -O2 -march=native -I/opt/wandbox/boost-1.79.0-gcc-11.1.0/include -std=c++11 -pedantic -fno-elide-constructors
prog.cc: In copy constructor 'A::A(const A&)':
prog.cc:12:16: warning: unused parameter 'o' [-Wunused-parameter]
   12 |     A(const A& o) { print("copy constructor"); }
      |       ~~~~~~~~~^
prog.cc: In constructor 'A::A(A&&)':
prog.cc:13:12: warning: unused parameter 'o' [-Wunused-parameter]
   13 |     A (A&& o) { print("move constructor"); }
      |        ~~~~^
prog.cc: In member function 'A& A::operator=(const A&)':
prog.cc:14:27: warning: unused parameter 'o' [-Wunused-parameter]
   14 |     A& operator=(const A& o) { print("copy assignment"); return *this; }
      |                  ~~~~~~~~~^
prog.cc: In function 'A operator+(const A&, const A&)':
prog.cc:19:22: warning: unused parameter 'a' [-Wunused-parameter]
   19 | A operator+(const A& a, const A& b) {
      |             ~~~~~~~~~^
prog.cc:19:34: warning: unused parameter 'b' [-Wunused-parameter]
   19 | A operator+(const A& a, const A& b) {
      |                         ~~~~~~~~~^
string constructor a
string constructor b
string constructor c
string constructor e
add
string constructor f
move constructor
destructor f
add
string constructor f
move constructor
destructor f
move assignment to:e from:
destructor 
destructor 
after add
move constructor
destructor e
move constructor
destructor 
destructor 
destructor c
destructor b
destructor a
Exit Code:
0