RVO + optional allows you do design differently Is there any proposals for non-nullable pointers ?
RVO + optional allows you do design differently
Is there any proposals for non-nullable pointers ? Would it even be practical ?
Is there any proposals for non-nullable pointers ? Would it even be practical ?
No any search results
You already invited:
1 Answers
meilinda
Upvotes from:
An either-type or error-type (`std::variant`, `std::optional`) is much more semantically viable, albeit it introduces a possible extra round of indirection, checking the invariant of a pointer "cannot be null" would result in the same amount of overhead.