From: "Fernando Cacciola" <[EMAIL PROTECTED]> > > value() is there just because the proxy() fails to convert to T&; > and the proxy is needed by the deep-constantess,
What is wrong with T & operator*(); T const & operator*() const; ? > Of course, it can be argued that if you wanted > to convey true constantness you should write: > > void foo ( optional<int const> const& opt ) > > instead. > > This is a possibility. > I could accept something like this, though I constantly see > people complaining about lack of deep constantness on wrappers like > optional<> > What do others think? Others think that, in spite of your insistence that optional is not a container, it is a container (size 0-1, fixed capacity of 1, typical container semantics of keeping extra capacity uninitialized), and deep constness is entirely appropriate. ;-) _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost