Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 3 years ago

Language

C++

Compiler

gcc HEAD 12.0.0 20210721 (experimental)

Options
Warnings
Optimization
Boost 1.73.0
C++2b
no pedantic

Author

anonymous

over 3 years ago

new.cpp

$ g++ prog.cc -Wall -Wextra -O2 -march=native -I/opt/wandbox/boost-1.73.0/gcc-head/include -std=c++2b
prog.cc: In function 'int main()':
prog.cc:13:7: error: use of deleted function 'U::U()'
   13 |     U tmp;
      |       ^~~
prog.cc:7:7: note: 'U::U()' is implicitly deleted because the default definition would be ill-formed:
    7 | union U {
      |       ^
prog.cc:9:19: error: union member 'U::value' with non-trivial 'non_trivially::non_trivially()'
    9 |     non_trivially value;
      |                   ^~~~~
prog.cc:13:7: warning: unused variable 'tmp' [-Wunused-variable]
   13 |     U tmp;
      |       ^~~
Exit Code:
1