
24 Oct
2005
24 Oct
'05
6:23 p.m.
"Fernando Cacciola" <fernando_cacciola@hotmail.com> writes:
So the only choices I see are:
o.rebind(rb)
or
o = optional<T&>(rb).
And I think I like the rebind() better.
One more reason to keep the latter: don't you want to be able to put optional's in std::containers? I think it's important that they be proper values; disabling assignment altogether would be bad, and I don't think I want optional<T&>'s assignment operator to deep-copy the T. -- Dave Abrahams Boost Consulting www.boost-consulting.com