Skip to content

legitimate usages of reinterpret_cast #550

@Dharmesh946

Description

@Dharmesh946

Channel

"C++Weekly"

Topics

What are the legit usages of reinterpret_cast?
see #129 discussion

NB: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p1839r7.html => will add a new legit usage (accessing object representation) though std::as_bytes + its writable version would be clearer in terms of intent (currently UB under P1839R7).

Length

5-10 minutes if not getting into the standard details or more if looking into the dark arcanes.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions