Boost logo

Boost :

From: Mat Marcus (mmarcus-boost_at_[hidden])
Date: 2003-09-17 10:47:18

--On Wednesday, September 17, 2003 11:04 AM -0400 gregod_at_[hidden]

> On Wednesday 17 September 2003 10:57 am, Mat Marcus wrote:
>> * Safe optional<bool>'s as tri-bools would be quite useful to
>> me. I personally would sacrifice the convenience of testing
>> without using is_initialized() to gain tri-bools but I don't want
>> to cover old territory. Perhaps there's some other way of making
>> optional<bool>'s safer to use. What would you think of, say, using
>> enable_if (or better disable_if) to disable implicit bool
>> conversion and operator! for when T == bool (or when T already
>> is_convertible to bool)?
>> - Mat
> Why not use a real tribool? There's one in the sandbox.
> Doug

Thanks, I will have a look. The above question still holds some
interest for me though. That is, I would like to be able to "safely"
use optional uniformly, including optional<bool> even in the cases
when I am not specifically trying to mimic a tribool.

 - Mat

Boost list run by bdawes at, gregod at, cpdaniel at, john at