[Boost-bugs] [Boost C++ Libraries] #9561: tribool documentation suggestion

Subject: [Boost-bugs] [Boost C++ Libraries] #9561: tribool documentation suggestion
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-01-11 12:38:00


#9561: tribool documentation suggestion
------------------------------+----------------------------
 Reporter: toby_toby_toby@… | Owner: dgregor
     Type: Tasks | Status: new
Milestone: To Be Determined | Component: logic
  Version: Boost 1.55.0 | Severity: Not Applicable
 Keywords: |
------------------------------+----------------------------
 Please add warning to docs (like basic usage of tribool) that you can't
 write like this.


 [[BR]]
 [[BR]]

 false==0, so it casted to function pointer, so this expression is always
 '''indeterminate''', not false:
 {{{
 tribool a = 0? indeterminate : false;
 }}}

 [[BR]]
 [[BR]]

 true!=0, so cast goes other way - indeterminate casted to bool, this
 epression always '''true''', not indeterminate:
 {{{
 tribool b = 1? indeterminate : true;
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9561>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:15 UTC