Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-10-10 16:06:54


From: "Howard Hinnant" <hinnant_at_[hidden]>
> The reverse argument is hard to defend too. Is this code portable?
>
> #include <sstream>
>
> int main ()
> {
> std::ostringstream s;
> s << "Hello, World!\n";
> }
>
> This code implicitly relies on basic_ostream defined in <ostream> and
> basic_ios defined in <ios>. Since templated base classes can be derived
> from with merely a forward declaration of the templated base, it is not
> clear if <ostream> and <ios> are implicitly included. If <ostream> is
> not included, then even the operator<<(const char*) won't be in scope!

Interesting.

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?

--
Peter Dimov
Multi Media Ltd.

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