tags:

views:

176

answers:

1

Hey all, Is there a boost equivalent for memcpy? Thanks!

EDIT: Sorry, I didn't realize memcpy was in the standard library :) I thought it was an OS call :(

+7  A: 

Does there need to be one? What's wrong with memcpy? Although it comes from C, it's a perfectly valid C++ function. If you want something that's aware of C++ objects and their assignment operators, then use std::copy. You might also want to take a look at std::uninitialized_copy.

Rob Kennedy
Indeed. memcpy( ) doesn't care what it's copying; objects, arrays, whatever. It's all bytes.
Stephen Canon