Skip to content

std::Questionable<T>

Questionable<T>

Represents a type that can be nullable or panicable

Constructors

Questionable

Default constructor (null)

Questionable() noexcept

Questionable

Null constructor

Questionable(const std::null_t&) noexcept

Questionable

Value constructor

Questionable(const T& value)

Questionable

Move value constructor

Questionable(T&& value)

Questionable

Error constructor

Questionable(const std::Panic::Frame& error)

Operators

operator==

Equality comparison with null

op ==(self, const std::null_t&) -> bool

operator!=

Inequality comparison with null

op !=(self, const std::null_t&) -> bool

operator?

Collapse operator to get T | null_t | Error

op ?(self) -> bool

operator in

Contains operator

op in(self, const E& other) -> bool

operator as

Cast to error type

op as(self, E*) -> E

operator as

Cast to value type

op as(self, T*) -> T

operator*

Dereference operator

op *(self) -> &T

operator T

Implicit conversion to T

op T(self) -> T