S
Samee Zahur
Hi all,
I'm a little confused - my guess is memcpy is no longer (or perhaps
never was) a standard c++ function, since it has very little type check
into it - and can potentially create havoc for user-defined types. Now
my confusion is here - a simple instantiation of the standard copy
algorithm can be quite slow compared to the older memcpy for obvious
reasons - specially for a large array of built-in types like int or
something; so do the majority of the compilers optimise this into a
single memcpy when used with POD types? How about the popular ones like
g++ or VC6?
Or, if memcpy is still in the c++ standard, why is it so and in
which standard header file can we find it?
Samee
I'm a little confused - my guess is memcpy is no longer (or perhaps
never was) a standard c++ function, since it has very little type check
into it - and can potentially create havoc for user-defined types. Now
my confusion is here - a simple instantiation of the standard copy
algorithm can be quite slow compared to the older memcpy for obvious
reasons - specially for a large array of built-in types like int or
something; so do the majority of the compilers optimise this into a
single memcpy when used with POD types? How about the popular ones like
g++ or VC6?
Or, if memcpy is still in the c++ standard, why is it so and in
which standard header file can we find it?
Samee