
Gavin Lambert wrote
It still bothers me a bit that none and nullptr are separate. Do we really need two different ways to spell "nothing"?
I suppose there is a use case for optional <some-pointer-type> which could have distinct states for "no pointer" vs. "null pointer" vs. "valid pointer", but how often do you really need to distinguish the first two states?
I have one such case in one project with optional<shared_ptr> where I have to distinguish nullptr from none, meaning "don't know". And I have several cases where nullptr means "override some pointer with nullptr" and none means "don't override that pointer." -- View this message in context: http://boost.2283326.n4.nabble.com/optional-Why-was-optional-T-reset-depreca... Sent from the Boost - Dev mailing list archive at Nabble.com.