Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

almost 5 years ago

Language

C++

Compiler

gcc 10.1.0

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

Author

anonymous

almost 5 years ago

$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.73.0/gcc-10.1.0/include -std=gnu++2a
prog.cc: In instantiation of 'void demo(X&&, Y&&) [with X = A; Y = B]':
prog.cc:36:18:   required from here
prog.cc:27:29: error: use of deleted function 'C::C(A&&)'
   27 |     std::common_type_t<X,Y> res1{std::forward<X>(x)};
      |                             ^~~~
prog.cc:18:5: note: declared here
   18 |     C(A&&) = delete;
      |     ^
prog.cc:27:29: warning: unused variable 'res1' [-Wunused-variable]
   27 |     std::common_type_t<X,Y> res1{std::forward<X>(x)};
      |                             ^~~~
Exit Code:
1