Opened 14 years ago
Closed 13 years ago
#2122 closed Bugs (fixed)
Documentation bug: << is stronger than ?:
Reported by: | Owned by: | Pavol Droba | |
---|---|---|---|
Milestone: | Component: | string_algo | |
Version: | Boost 1.35.0 | Severity: | Problem |
Keywords: | Cc: |
Description
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 ?:.
Component of this ticket should probably be changed to 'Documentation'. Sorry, I'm a newbie in Boost Trac system.
--- Author of the ticket.