Boost logo

Boost :

From: Simon Richter (Simon.Richter_at_[hidden])
Date: 2005-10-18 10:52:55


Rob Stewart wrote:

> An optional<T&> should optionally contain a reference to T.
> Either optional<T&> has a T& or it doesn't. Since T& cannot be
> rebound, neither should optional<T&>'s T& be rebound by
> assignment from another T&. That said, assigning from none
> restores the optional<T&> to (the equivalent of) its default
> constructed state, so it can bind to a new T&.

I agree on that one. If the developer wanted a pointer, he'd have asked
for it.


Boost list run by bdawes at, gregod at, cpdaniel at, john at