|
|
|
|
|
by grandmczeb
2197 days ago
|
|
I am replying to you and its pretty obviously related to your comment. You: "C++, Java, and so on have had generics for ages and with types like the one above, null pointer exceptions are incredibly common." jcelerier: "you'd never get a null-pointer exception in C++ given the type that OP mentioned." You: "Then you can't construct it unless it's successful, no?" Me: "The equivalent type in C++ [to what the OP mentioned] is std::expected". It is not possible to get a null-pointer exception with this type and yet you can construct it. |
|