![]() |
STX
1.0.0
|
#include <option_result.h>
value-variant for Option<T>
wrapping the contained value
Note that Some
is only a value-forwarding type. It doesn't make copies of its constructor arguments and only accepts r-values.
What does this mean?
For example, You can:
You can't:
But, to explicitly make a
take ownership, you will:
C++ 17 and above
using stx::Some< T >::value_type = T |
a Some<T>
can only be constructed with an r-value of type T
|
default |
|
inline |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inline |