因此, 你需要谨慎使用 reinterpret_cast. 注意:static_cast不能转换掉expression的const、volitale、或者__unaligned属性。 reinterpret_cast 暴力转化,等价于C中的强制转换。 static_cast不能转函数指针。 The reinterpret_cast operator cannot cast away the const, volatile, or __unaligned attributes. 使用这个操作...
const_cast can be used to remove or add const to a variable; no other C++ cast is capable of removing it (not even reinterpret_cast). It is important to note that modifying a formerly const value is only undefined if the original variable is const; if you use it to take the const o...
>>-reinterpret_cast--<--Type-->--(--expression--)--->< The reinterpret_cast operator produces a value of a new type that has the same bit pattern as its argument. You cannot cast away aconstorvolatilequalification. You can explicitly perform the following conversions: A pointer to any ...
The reinterpret_cast operator cannot cast away the const, volatile, or __unaligned attributes. See const_cast Operator for information on removing these attributes.The reinterpret_cast operator converts a null pointer value to the null pointer value of the destination type....
The reinterpret_cast operator cannot cast away the const, volatile, or __unaligned attributes. See const_cast Operator for information on removing these attributes.The reinterpret_cast operator converts a null pointer value to the null pointer value of the destination type....
The result of a reinterpret_cast cannot safely be used for anything other than being cast back to its original type. Other uses are, at best, nonportable. The reinterpret_cast operator cannot cast away theconst, volatile, or__unalignedattributes. Seeconst_cast Operatorfor information on removing...
The result of a reinterpret_cast cannot safely be used for anything other than being cast back to its original type. Other uses are, at best, nonportable. The reinterpret_cast operator cannot cast away theconst, volatile, or__unalignedattributes. Seeconst_cast Operatorfor information on removing...
The result of areinterpret_castcannot safely be used for anything other than being cast back to its original type. Other uses are, at best, nonportable. Thereinterpret_castoperator cannot cast away theconst,volatile, or__unalignedattributes. Seeconst_cast Operatorfor information on removing these...
The reinterpret_cast operator cannot cast away the const, volatile, or __unaligned attributes. See const_cast Operator for information on removing these attributes.The reinterpret_cast operator converts a null pointer value to the null pointer value of the destination type....
The result of a reinterpret_cast cannot safely be used for anything other than being cast back to its original type. Other uses are, at best, nonportable. The reinterpret_cast operator cannot cast away theconst, volatile, or__unalignedattributes. Seeconst_cast Operatorfor information on removing...