Boost logo

Boost :

From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2007-07-13 13:50:11


> Hartmut Kaiser wrote:
> ...
>
> > Seems to be fine this way. Hold_any supports streaming only if the
> > contained datatype is streamable.
>
> Are you sure that hold_any can be used with a non-streamable
> type at all?

Let me re-phrase it (sorry for beeing inconcise) : hold_any can be used
(compiled) only, if the type contained is streamable.
So yes, you're right, hold_any can't be used with non-streamable types.

> Also, in assign<T>, are you sure that overwriting the old
> object contents with placement new without destroying the
> object first is a good idea? Looks like repeated a =
> std::string( "..." ) calls will leak the heap-allocated
> string contents on each assignment.

Good catch! Thanks, will fix this.

Regards Hartmut


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