Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-10-10 19:31:06

----- Original Message -----
From: "Howard Hinnant" <hinnant_at_[hidden]>

> Additionally, it would be nice if we had some generalized rules that
> said /why/ this is portable code, instead of just saying: well,
> <sstream> will include <ostream> and <ios> and whatever else is
> necessary to make this work. Maybe the paragraph I proposed eariler
> isn't the correct generalized rule. But I would like to see something
> like that; fairly easy to understand, and generally applicable.

A rule I would consider acceptable (but which wouldn't help Bill) is:

"any standard header which supplies the /definition/ of a class template
also supplies the definition of all of its base classes"

That rule gives you the ability to construct an ostringstream by including
<sstream>. I don't think it lets you stream a char* into that ostringstream,
because the definition of the appropriate inserter might still not be
available. I don't know how to reasonably extend the rule above so that it
would let you stream the char* without including <ostream>, but I'm open to


  David Abrahams, C++ library designer for hire

        C++ Booster (
          email: david.abrahams_at_[hidden]

Boost list run by bdawes at, gregod at, cpdaniel at, john at