
17 Oct
2005
17 Oct
'05
8:16 p.m.
On Behalf Of Leo Goodstadt
The easiest solution to disambiguate, would be to force all binding and rebinding of optional references to use distinct syntax (rebind) so that this is clearly signalled at the minor cost of some syntactic verbosity. This means that optional<T&> is no longer completely orthogonal to optional<T> in its syntax, but as that merely reflects the real underlying differences in semantics, this should be an advantage not a disadvantage.
An easy way to do that would be to disallow optional<T&> and spell it instead as optional<reference_wrapper<T> > as someone suggested the last time this was discussed.