I do realize is_pod
is a sufficient condition for a type to be memcpy
-able, but is has_trivial_destructor
also sufficien
Although it's generally rare in practice, there may be a situation where a class has a non-trivial copy constructor, along with a trivial destructor. Consider a class with a static member variable that just counts how many times the class has been copied. If you memcpy
it, the counter would be inaccurate.