C++ Logo


Advanced search

Fixing common reinterpret_cast design patterns

From: sdkrystian <sdkrystian_at_[hidden]>
Date: Sat, 20 Jul 2019 14:36:45 -0400
I have been working on some wording to change the following things with reinterpret_cast:- allow casting to char*, unsigned char* and std::byte* to access the object representation of an object, and- allow casting from char*, unsigned char* and std::byte* to an object pointer type T, where the pointer being casted is a pointer to an array or first element thereof providing storage to an object of type TThese are very common design patterns that are often used, and they currently have undefined behavior. I would like to get a sense of if this would be something that you all would like to see. Please provide any feedback or suggestions 😊

Received on 2019-07-20 13:38:44