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 instantiation of 'auto negate(T) [with T = non_negatable]':
prog.cc:14:11:   required by substitution of 'template<class T>  requires  is_negatable<T> auto do_negate(T) [with T = non_negatable]'
prog.cc:29:14:   required from here
prog.cc:8:12: error: no match for 'operator-' (operand type is 'non_negatable')
    8 |     return -a;
      |            ^~
Exit Code:
1