▲ | afdbcreid 4 days ago | |
But the dereference operator invokes UB if there is no value. Which is a recurring theme in C++: the default behavior is unsafe (in order to be faster), and there is a method to do the safe thing. Which is exactly the opposite of what it should be. | ||
▲ | account42 4 days ago | parent [-] | |
No, it's the reason people choose C++. |