Boost logo

Boost Users :

From: Douglas Gregor (doug.gregor_at_[hidden])
Date: 2005-06-30 09:41:54


On Jun 29, 2005, at 2:24 AM, Serge Skorokhodov wrote:

> Hi,
> I'm using boost::logic::tribool for expressing logical flags that may
> be
> nulls by their nature (patient not asked, he/she doesn't know etc.).
> Default initialization to 'false' seems to be quite unnatural in this
> context and initialization to 'undetermined' seems to be prefered. Is
> any significant reason for boost::logic::tribool default constructor
> initializing the value to 'false'?

Because default-constructing a bool gives a false value, and tribool
tries to mimick bool as well as possible.

        Doug


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net