解答出處
http://stackoverflow.com/questions/5014061/whats-the-use-of-atl-packing-constant-when-computing-distance-from-the-start-o
?
C++標準規定:
編譯器的類的類型轉換對空指針(NULL)特殊處理,即你NULL進行強制類型轉化的結果還是NULL,所以….
static_cast類型轉化的時候,_ATL_PACKING的值得是非零就好
?
C++ Standard 4.10/3 Pointer conversions [conv.ptr]:
An rvalue of type “pointer to cv D,” where D is a class type, can be converted to an rvalue of type “pointer to cv B,” where B is a base class (clause 10) of D. If B is an inaccessible (clause 11) or ambiguous (10.2) base class of D, a program that necessitates this conversion is ill-formed. The result of the conversion is a pointer to the base class sub-object of the derived class object. The null pointer value is converted to the null pointer value of the destination type.