From: "Fernando Cacciola" <[EMAIL PROTECTED]> > The conversion to bool for a smart pointer unambiguously refers to the > NULL state of the pointer wrapped. > In the case of optional, a conversion to bool will be ambiguous in those > cases were the wrapped T in optional<> is bool itself.
On the other hand, it would enable the useful idiom if(optional<T> pt = get_optional_T()) { // use *pt } I don't think that optional<bool> is an important use case (outside of generic contexts) since optional<bool> is simply a tri-state type with an inconvenient interface. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost