Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

almost 6 years ago

Language

C++

Compiler

clang HEAD 9.0.0 (https://github.com/llvm-mirror/clang.git d9f9d6531f3c8c8ce22b63989cdeaeb220f0f36a) (https://github.com/llvm-mirror/llvm.git e3fd2a343a10616bd1d7e010c32c675fc934802e)

Options
Warnings
Boost 1.70.0
C++2a
no pedantic

Author

anonymous

almost 6 years ago

$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.70.0/clang-head/include -std=c++2a
prog.cc:9:9: error: no viable overloaded '='
    X{} = "hello";
    ~~~ ^ ~~~~~~~
prog.cc:3:8: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'const char [6]' to 'const X' for 1st argument
struct X {
       ^
prog.cc:3:8: note: candidate function (the implicit move assignment operator) not viable: no known conversion from 'const char [6]' to 'X' for 1st argument
struct X {
       ^
prog.cc:4:8: note: candidate function not viable: no known conversion from 'X' to 'X' for object argument
    X& operator=(const char*) &
       ^
1 error generated.
Exit Code:
1