|
Boost : |
From: Edward Diener (eddielee_at_[hidden])
Date: 2003-08-25 20:38:11
Pavel Vozenilek wrote:
> "David Abrahams" <dave_at_[hidden]> wrote in message
> news:uk791pr0w.fsf_at_boost-consulting.com...
> ...
>>
>> I don't believe you can use memcpy to move any non-POD types
>> portably,
>> i.e. without special knowledge of the compiler.
>>
> Thats my point - you may flag some types as safely moveable and then
> use
> this knowledge in algorithms. User has the responsibility to do the
> decision.
Extremely dangerous and error prone. I can't even imagine a non-POD type
where flagging it for memcpy_copyable and memcpy_moveable can be right. Can
you give an example ?
Also, "flagging it" introduces some more complication on the user's part.
How would you propose the user do this ?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk