I do realize is_pod is a sufficient condition for a type to be memcpy-able, but is has_trivial_destructor also sufficient for this purpose? If not, why?
I do realize is_pod is a sufficient condition for a type to be memcpy
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No. The requirement is that the type be trivially copyable (§3.9/2) which has a few more requirements, like the lack of a non-trivial copy constructor (§9/6).
So you should use
is_trivially_copyableinstead.