Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

about 4 years ago

Language

C++

Compiler

gcc 11.1.0

Options
Warnings
Boost 1.76.0
C++2b(GNU)
no pedantic

Author

anonymous

about 4 years ago

$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.76.0/gcc-11.1.0/include -std=gnu++2b
prog.cc: In function 'int main()':
prog.cc:25:22: error: cannot bind rvalue reference of type 'int&&' to lvalue of type 'const int'
   25 |   std::cout << (c == n) << std::endl;
      |                      ^
prog.cc:5:25: note:   initializing argument 1 of 'consteval lzero::lzero(int&&)'
    5 |   consteval lzero(int&& n) {
      |                   ~~~~~~^
Exit Code:
1