$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Terje Slettebų (tslettebo_at_[hidden])
Date: 2003-03-28 21:08:15
>From: "Black Ice" <yg-boost-users_at_[hidden]>
> lexical_cast.hpp line 145:
> bool operator<<(const Source &input)
> {
> return stream << input;
> }
> Convert basic_stringstream & to bool?
Yes. :)
basic_stringstream has a user-defined conversion to void *, which then
converts to bool, giving the stream state. It has been suggested on the
Boost list to change this to a more explicit test, though (also to remove a
warning for this conversion), such as:
bool operator<<(const Source &input)
{
return !(stream << input).fail();
}
Regards,
Terje