Tutorial - 1.55.0

Boost C++ Libraries ...one of the most highly regarded and expertly designed C++ library projects in the world. — Herb Sutter and Andrei Alexandrescu , C++ Coding Standards Basic usage Renaming the indeterminate state tribool input/output The tribool class acts like the built-in bool type, but for 3-state boolean logic. The three states are true , false , and indeterminate , where the first two states are equivalent to those of the C++ bool type and the last state represents an unknown boolean value (that may be true or false , we don't know). The tribool class supports conversion from bool values and literals along with its own indeterminate keyword: tribool b(true); b = false; b = indeterminate ; tribool b2(b); tribool supports conversions to bool for use in conditional statements. The conversion to bool wil...

Linked on 2014-07-24 20:58:50 | Similar Links