Boost C++ Libraries: Ticket #2122: Documentation bug: << is stronger than ?: https://svn.boost.org/trac10/ticket/2122 <p> Usage part of documenation holds an examle: </p> <p> cout &lt;&lt; str1 &lt;&lt; is_executable("command.com")? "is": "is not" &lt;&lt; "an executable" &lt;&lt; endl; </p> <p> ... </p> <p> cout &lt;&lt; text1 &lt;&lt; all( text1, is_lower() )? "is": "is not" &lt;&lt; " written in the lower case" &lt;&lt; endl; </p> <p> (some extra space characters omitted) It's not compile thouth. Solution is like that: </p> <p> cout &lt;&lt; str1 &lt;&lt; (is_executable("command.com")? "is": "is not") &lt;&lt; "an executable" &lt;&lt; endl; </p> <p> ... </p> <p> cout &lt;&lt; text1 &lt;&lt; (all( text1, is_lower() )? "is": "is not") &lt;&lt; " written in the lower case" &lt;&lt; endl; </p> <p> which takes into account higher precedence of operator&lt;&lt; over ?:. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2122 Trac 1.4.3 ulysses4ever@… Thu, 17 Jul 2008 21:21:41 GMT <link>https://svn.boost.org/trac10/ticket/2122#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2122#comment:1</guid> <description> <p> Component of this ticket should probably be changed to 'Documentation'. Sorry, I'm a newbie in Boost Trac system. </p> <p> --- Author of the ticket. </p> </description> <category>Ticket</category> </item> <item> <pubDate>Mon, 03 Nov 2008 14:20:34 GMT</pubDate> <title>milestone deleted https://svn.boost.org/trac10/ticket/2122#comment:2 https://svn.boost.org/trac10/ticket/2122#comment:2 <ul> <li><strong>milestone</strong> <span class="trac-field-deleted">Boost 1.35.1</span> </li> </ul> <p> Milestone Boost 1.35.1 deleted </p> Ticket Steven Watanabe Mon, 01 Jun 2009 00:52:18 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/2122#comment:3 https://svn.boost.org/trac10/ticket/2122#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Fixed in <a class="changeset" href="https://svn.boost.org/trac10/changeset/53520" title="Fix operator precedence error in documentation. Fixes #2122">[53520]</a>. </p> Ticket