"Fernando Cacciola" <[EMAIL PROTECTED]> writes: > "David Abrahams" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... >> "Fernando Cacciola" <[EMAIL PROTECTED]> writes: >> >> > Any idea about what to do with reference to reference problem? >> >> What's the problem? >> > Currently, optional<Y> has: > > explicit optional ( T const& val ) > T* get(); > T* operator->() ; > T& operator *(); > > those are all illegal if T is a reference type.
explicit optional ( typename add_reference<typename add_const<T>::type>::type val ) typename add_pointer<typename remove_reference<T>::type>::type get(); typename add_pointer<typename remove_reference<T>::type>::type operator->() ; typename add_reference<T>::type operator *(); >> > >> > What was the idea of: optional< exactly<T&> > ? >> >> It's an ambiguity breaker: a way of specifying, when constructed with >> a variant<T,T&>, that you want to get the T& and not the T. >> > hmmm, shouldn't 'exactly' appear along with extract then? > What's the meaning of "optional< exactly<T&> > " by itself, without > variant<T,T&> in the scene? I dunno, maybe nothing; we were talking about optional as a replacement for extract. -- Dave Abrahams Boost Consulting www.boost-consulting.com _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost