Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

almost 5 years ago

Language

C++

Compiler

gcc HEAD 11.0.0 20200704 (experimental)

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-head/include -std=gnu++2a
prog.cc: In instantiation of 'void foo(F&&) [with F = void (&)()]':
prog.cc:13:10:   required from here
prog.cc:5:19: error: cannot bind non-const lvalue reference of type 'void (*&)()' to an rvalue of type 'void (*)()'
    5 |  std::decay_t<F>& x = f;
      |                   ^
Exit Code:
1