Language
C++
Compiler
gcc 12.2.0
Options
Warnings
Don't Use Boost
C++17
-pedantic-errors
Raw compiler options
-W
$ g++ prog.cc -Wall -Wextra -std=c++17 -pedantic-errors -W
Exit Code:
1
Author
anonymous
about 2 years ago
C++
gcc 12.2.0
Author
anonymous
about 2 years ago
$ g++ prog.cc -Wall -Wextra -std=c++17 -pedantic-errors -W
In file included from prog.cc:1:
/opt/wandbox/gcc-12.2.0/include/c++/12.2.0/optional: In instantiation of 'class std::optional<std::nullopt_t>':
prog.cc:4:49: required from here
/opt/wandbox/gcc-12.2.0/include/c++/12.2.0/optional:719:22: error: static assertion failed
719 | static_assert(!is_same_v<remove_cv_t<_Tp>, nullopt_t>);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/wandbox/gcc-12.2.0/include/c++/12.2.0/optional:719:22: note: '!(bool)std::is_same_v<std::nullopt_t, std::nullopt_t>' evaluates to false