"Rozental, Gennadiy" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > Did you consider to provide bool specialization that does not have > > safe_bool > > > convertion and allowing it for all other types? > > > > > Yes, I did it too. The problem is that in this case, > > optional<T!=bool> and > > optional<bool> would have different semantics; subtly > > different actually, > > which is worst. > > I much prefer a consistent semantic. > > What about vector<bool>? > IMO that this inconsistent semantic is reasonable price for better > usability. Exactly. I don't like vector<bool>. It has different semantics and so it should have been a *different* class.
> > Moreover I would prohibit optional<bool> at all. Area of application of such > class supposedly much better covered by tri-state bool discussed recently. > I don't think that prohibiting optional<bool> is a good idea. I think I agree that tribool is likely to cover all the cases were optional<bool> would be used, but disabling optional<bool> would create a genericity problem in case you use optional<T> and T happens to be bool. -- Fernando Cacciola _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost