开发者

What does the compiler do to perform a cast operation in C++? [duplicate]

开发者 https://www.devze.com 2023-01-12 16:32 出处:网络
This questio开发者_开发问答n already has answers here: Closed 12 years ago. Possible Duplicate: How do C/C++ compilers handle type casting between types with different value ranges?
This questio开发者_开发问答n already has answers here: Closed 12 years ago.

Possible Duplicate:

How do C/C++ compilers handle type casting between types with different value ranges?

What does the compiler do to perform a cast operation in C++?

Explain with some sample C++ code.


Standard sections

5.2.7, 5.2.8, 5.2.9, 5.2.10 and 5.2.11

give a good idea on how these casts work (which is what compiler and/or runtime implement).

reinterpret_cast is the only one whose behavior is kind of implementation defined.

0

精彩评论

暂无评论...
验证码 换一张
取 消