Skip to main content
The 2026 Annual Developer Survey is live— take the Survey today!

Timeline for answer to reinterpret_cast by Tobias Langner

Current License: CC BY-SA 4.0

Post Revisions

7 events
when toggle format what by license comment
S Jan 11, 2021 at 13:21 history edited Adrian Mole CC BY-SA 4.0
A paragraph quote should be a blockquote.
S Jan 11, 2021 at 13:21 history suggested Cadoiz CC BY-SA 4.0
A paragraph quote should be a blockquote.
Jan 11, 2021 at 12:32 review Suggested edits
S Jan 11, 2021 at 13:21
Jan 20, 2011 at 22:43 vote accept Simplicity
Jan 20, 2011 at 22:42 vote accept Simplicity
Jan 20, 2011 at 22:42
Jan 20, 2011 at 14:43 comment added David Thornley It doesn't necessarily have the same bit pattern. There are very few guarantees on reinterpret_cast in the Standard. 5.2.10/3 says "The mapping performed by reinterpret_cast is implementation-defined. [Note: it might, or might not, produce a representation different from the original value.]" Also, a reinterpret_cast cannot cast an int to a float (it can cast int * to float *). Any implementation that does that cast is in violation of the Standard (5.2.10/1, last sentence), although it's probably a common enough extension.
Jan 20, 2011 at 14:27 history answered Tobias Langner CC BY-SA 2.5