
13 Jul
2007
13 Jul
'07
3:20 p.m.
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? 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.