Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Language

C++

Compiler

gcc 8.2.0

Options
Warnings
Don't Use Boost
C++17
no pedantic

$ g++ prog.cc -Wall -Wextra -std=c++17
prog.cc: In function 'int main()':
prog.cc:11:12: error: call of overloaded 'X(Y)' is ambiguous
     X x(Y{});
            ^
prog.cc:2:5: note: candidate: 'X::X(int)'
     X(int) {}
     ^
prog.cc:1:8: note: candidate: 'constexpr X::X(const X&)'
 struct X {
        ^
prog.cc:1:8: note: candidate: 'constexpr X::X(X&&)'
Exit Code:
1