Boost logo

Boost :

From: Howard Hinnant (hinnant_at_[hidden])
Date: 2001-10-10 16:58:29


On Wednesday, October 10, 2001, at 05:06 PM, Peter Dimov wrote:

> Is std::ostringstream after <sstream> a complete type? I hope that
> you'll
> say 'yes' because the other way lies madness.
>
> Can a complete type have incomplete bases?

My point is that the following will compile on most compilers:

template <class charT, class traits> class basic_ostream;

template <class charT, class traits, class Allocator>
class basic_ostringstream
        : public basic_ostream<charT, traits>
{
};

But you must fill out basic_ostream before you instantiate a
basic_ostringstream. Hopefully the job of filling out basic_ostream
will be done for you when you #include <sstream>. Otherwise you might
have to #include <ostream> yourself.

-Howard


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk