StormByte 3.0.0
C++26 foundation of the StormByte suite
Loading...
Searching...
No Matches
StormByte::Type::Optional Concept Reference

std::optional<U> or a Safe optional wrapper. More...

#include <StormByte/type_traits/wrappers.hxx>

Concept definition

template<typename T>
(requires { typename T::value_type; } &&
std::same_as<T, std::optional<typename T::value_type>>) || IsSafeOptional<T>::value
std::optional<U> or a Safe optional wrapper.
Definition wrappers.hxx:152
Identifies Safe optional wrappers.
Definition safe.hxx:329

Detailed Description

std::optional<U> or a Safe optional wrapper.

Template Parameters
TType to test (no decay).

A type that merely has value_type does not match. Safe optional types are registered explicitly and use the same optional wire framing.

template<Type::Optional T>
void process(T opt);