3 ms·
> It must be understood that std::optional is not an Option type, its purpose is not to have a way to express "missing" items in a type-safe manner but rather t
by saagarjha 9y ago
> It must be understood that std::optional is not an Option type, its purpose is not to have a way to express "missing" items in a type-safe manner but rather to have pointer-type semantics without needing to heap-allocate.
I don't understand what you mean here. I don't have to heap-allocate to get a pointer to something; I can just take the address of something on the stack…