id summary reporter owner description type status milestone component version severity resolution keywords cc 9603 boost::optional operator<< does the wrong thing a.luenser+boost@… Fernando Cacciola "{{{ template inline std::basic_ostream& operator<<(std::basic_ostream& out, optional const& v) { if ( out.good() ) { if ( !v ) out << ""--"" ; else out << ' ' << *v ; } return out; } }}} This is the wrong semantics, in my opinion. Example of the problem: {{{ std::string s(""--""); boost::optional o; std::cout << s << std::endl; std::cout << o << std::endl; }}} prints the same, which is clearly not intended. If the optional is not engaged (no value), printing should to nothing, i.e. return the stream unmodified. Also, the ' ' character in the code above should be removed." Bugs closed To Be Determined optional Boost 1.55.0 Problem invalid