
13 Jul
2007
13 Jul
'07
5:50 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?
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