Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 5 years ago

Language

C++

Compiler

clang HEAD 10.0.0 (https://github.com/llvm-mirror/clang.git f1a4d8270deb2472ac5245a53a85c7c35155ea29) (https://github.com/llvm-mirror/llvm.git 241382452690ab54ef35919b858bea9b169a62df)

Options
Warnings
Boost 1.71.0
C++2a
no pedantic

Author

anonymous

over 5 years ago

$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.71.0/clang-head/include -std=c++2a
prog.cc:6:26: warning: unused parameter 'a' [-Wunused-parameter]
bool operator==(const A &a, const B &b){ return true; };
                         ^
prog.cc:6:38: warning: unused parameter 'b' [-Wunused-parameter]
bool operator==(const A &a, const B &b){ return true; };
                                     ^
prog.cc:11:33: warning: unused parameter 'lhs' [-Wunused-parameter]
      bool operator==( const B &lhs ) const { return false; };
                                ^
prog.cc:22:9: error: use of overloaded operator '==' is ambiguous (with operand types 'A' and 'B')
  if( a == b )
      ~ ^  ~
prog.cc:6:6: note: candidate function
bool operator==(const A &a, const B &b){ return true; };
     ^
prog.cc:11:12: note: candidate function
      bool operator==( const B &lhs ) const { return false; };
           ^
prog.cc:18:15: warning: unused parameter 'argc' [-Wunused-parameter]
int main( int argc, char **argv )
              ^
prog.cc:18:28: warning: unused parameter 'argv' [-Wunused-parameter]
int main( int argc, char **argv )
                           ^
5 warnings and 1 error generated.
Exit Code:
1