Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 4 years ago

Language

C++

Compiler

clang 10.0.0

Options
Warnings
Don't Use Boost
C++2a(GNU)
no pedantic

Author

anonymous

over 4 years ago

$ clang++ prog.cc -Wall -Wextra -std=gnu++2a
prog.cc:10:16: warning: ISO C++20 considers use of overloaded operator '==' (with operand types 'B' and 'B') to be ambiguous despite there being a unique best viable function [-Wambiguous-reversed-operator]
    return B() == B();
           ~~~ ^  ~~~
prog.cc:3:10: note: ambiguity is between a regular call to this operator and a call with the argument order reversed
    bool operator==(const T&) const;
         ^
1 warning generated.
/usr/lib/gcc/x86_64-linux-gnu/5.5.0/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
/tmp/prog-cf007c.o: In function `f()':
prog.cc:(.text+0x14): undefined reference to `A<B>::operator==(B const&) const'
clang-10: error: linker command failed with exit code 1 (use -v to see invocation)
Exit Code:
1