Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 6 years ago

Language

C++

Compiler

clang HEAD 8.0.0 (https://github.com/llvm-mirror/clang.git 4478cc1b78174a29430da5419cef6881298e1491) (https://github.com/llvm-mirror/llvm.git f5dffd96859660834a4a836f0e7a5eb0a915e547)

Options
Warnings
Boost 1.68.0
C++2a(GNU)
no pedantic

Author

anonymous

over 6 years ago

$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.68.0/clang-head/include -std=gnu++2a
prog.cc:4:17: error: call to implicitly-deleted copy constructor of 'X'
    X(bool b) : X(b ? X(42): X(666)) {} // clang doesn't like this
                ^ ~~~~~~~~~~~~~~~~~
prog.cc:7:30: note: copy constructor of 'X' is implicitly deleted because variant field 'y' has a non-trivial copy constructor
    union {int x; NonTrivial y;};
                             ^
1 error generated.
Exit Code:
1