|
|
От: |
Sm0ke
|
ksi |
| Дата: | 05.08.23 14:25 | ||
| Оценка: | |||
#include <optional>
#include <cstddef>
template <std::optional<std::size_t> Size>
struct omg {};msvc ~
error C2993: 'std::optional<unsigned __int64>': is not a valid type for non-type template parameter 'Size'
message : '_Optional_construct_base<unsigned __int64>' is not a public base class
gcc ~
error: 'std::optional<long unsigned int>' is not a valid type for a template non-type parameter because it is not structural
/opt/compiler-explorer/gcc-13.1.0/include/c++/13.1.0/optional:705:11: note: base class 'std::_Optional_base<long unsigned int, true, true>' is not public