Subject: [Boost-bugs] [Boost C++ Libraries] #2122: Documentation bug: << is stronger than ?:
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-07-16 18:15:07
#2122: Documentation bug: << is stronger than ?:
------------------------------------+---------------------------------------
Reporter: ulysses4ever_at_[hidden] | Owner: pavol_droba
Type: Bugs | Status: new
Milestone: Boost 1.35.1 | Component: string_algo
Version: Boost 1.35.0 | Severity: Problem
Keywords: |
------------------------------------+---------------------------------------
Usage part of documenation holds an examle:
cout << str1 << is_executable("command.com")? "is": "is not" << "an
executable" << endl;
...
cout << text1 << all( text1, is_lower() )? "is": "is not" << " written in
the lower case" << endl;
(some extra space characters omitted)
It's not compile thouth. Solution is like that:
cout << str1 << (is_executable("command.com")? "is": "is not") << "an
executable" << endl;
...
cout << text1 << (all( text1, is_lower() )? "is": "is not") << " written
in the lower case" << endl;
which takes into account higher precedence of operator<< over ?:.
-- Ticket URL: <http://svn.boost.org/trac/boost/ticket/2122> 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:49:58 UTC