Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 3 years ago

Language

C++

Compiler

gcc 11.1.0

Options
Warnings
Boost 1.78.0
C++2a
no pedantic

Author

anonymous

over 3 years ago

$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.78.0-gcc-11.1.0/include -std=c++2a
prog.cc: In function 'int main()':
prog.cc:14:22: error: use of deleted function 'test& test::operator=(test&&)'
   14 |     t1 = std::move(t2); // tries to select the implicitly-declared one!
      |                      ^
prog.cc:3:8: note: 'test& test::operator=(test&&)' is implicitly deleted because the default definition would be ill-formed:
    3 | struct test {
      |        ^~~~
prog.cc:3:8: error: non-static reference member 'int& test::i_', cannot use default assignment operator
Exit Code:
1