|
-
August 9th, 2009, 01:07 AM
#20
Re: reinterpret_cast<> and where can it be used
The behavior of this operator is implementation defined. It may but is not required to reinterpret bits. Using this cast is usually not portable.
Do you know what he means under "not portable"? I can say that 50%(less or more) C++ features not portable between different platforms. But it's true if you use things dependent on concrete platform. For example you have an address stored inside the int type and you use reinterpret_cast , you shouldn't hope you would have the same pointer's value on different platforms but this code would portable if you don't predict pointer's value.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|