24 Feb
2004
24 Feb
'04
2:58 a.m.
Hi,
I defined the following operator to stream optional<char>'s:
std::ostream &
operator<< (std::ostream & os, boost::optional<char> const & op)
{
if (op) os << *op; else os << '_';
return os;
}
Now, when I use:
boost::optional<char> a ('a');
std::cout << a;
'a' is printed like I expected. However, when I use:
std::ostream_iterator