|
|
|
|
|
by masklinn
1064 days ago
|
|
> The C++ standard library already exposes a std::optional type. Does this stx::Option type differ from that one? std::optional is a stack pointer, like other C++ pointers you can straight up deref’ it and get an UB. It looks like stx::Option is an actually option type, it focuses on safety and will throw if “unsafe” methods are called on the wrong state. It also provides a slew of monadic operators to operate over values. |
|