C++.Coding.Standards.1918.Rules.Guidelines [Electronic resources]

Herb Sutter, Andrei Alexandrescu

نسخه متنی -صفحه : 521/ 471
نمايش فراداده

Summary

Lies have short legs (German and Romanian proverb): Don't try to use

reinterpret_cast to force the compiler to reinterpret the bits of an object of one type as being the bits of an object of a different type. That's the opposite of maintaining type safety, and

reinterpret_cast isn't even guaranteed to do that or anything else in particular.