Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 5 years ago

Language

C++

Compiler

gcc HEAD 10.0.0 20191030 (experimental)

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

Author

anonymous

over 5 years ago

$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.71.0/gcc-head/include -std=gnu++2a
prog.cc: In function 'int main()':
prog.cc:7:16: error: no match for 'operator+' (operand type is 'main()::<lambda(int)>')
    7 |     auto foo = +[=](int x) { return x + 42 + i; };
prog.cc:8:54: error: template argument 1 is invalid
    8 |     static_assert(std::is_same<decltype(foo), FuncPtr>::value);
      |                                                      ^
Exit Code:
1