@EleanoreY: Please don't! To view the purposes they believe they have legitimate interest for, or to object to this data processing use the vendor list link below. using the print() function to display the contents of the Why is f(i = -1, i = -1) undefined behavior? decide you have to use @M.M: No, but the rest of it is fairly trivial fixes to the syntax. How to reinterpret or cast an object with known memory layout without getting Undefined Behavior Cast a pointer to struct to a pointer to the only member of that struct How to cast pointer to unnamed struct pointer? A cast is a special operator that forces one data type to be converted into another. It is indeed legal to view any object as an array of bytes. - Expression is a pointer to be reinterpreted. @C++11MaciejPiechotka@bames53:C++03 . each int to zero. 1. apiFunction (reinterpret_cast<const void*> (vertices.data ()), N); This compiles and seems to behave as desired, but I want to make sure I haven't just been lucky and a problem lurks. Can several CRTs be wired in parallel to one oscilloscope circuit? Public inheritance should model an IS-A relationship; otherwise, someone will sometime try to use an A where a C is needed and have their code behave nonsensically. It is indeed legal to view any object as an array of bytes. Making statements based on opinion; back them up with references or personal experience. Run-time type identification RTTItypeId dynamic_cast c++RTTI. new expressions (C++ only) Placement syntax. "std::byte is a similar type to any type" AFAICT cppreference does not make any such claim. A structure type (or struct type) is a value type that can encapsulate data and related functionality. They have a common struct C. Structure and union type definition. BoxAdcontent.document.write("<\/body><\/html>"); To subscribe to this RSS feed, copy and paste this URL into your RSS reader. unique ptr struct Node to replace node itself in the tree: points to unique ptr that owns this no. Where does the idea of selling dragon parts come from? function writeBCBoxAdContent() { C++ keywords: reinterpret_cast C++ C++ language Keywords Usage reinterpret_cast type conversion expression: as the declaration of the expression Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/keyword/reinterpret_cast&oldid=117613" In other languages This page was last modified on 9 April 2020, at 15:23. C++11 Code: /* reinterpret_cast does not make any guarantees that the bits of the LHS will be related to the bits of the RHS. Member declarations. struct). Making statements based on opinion; back them up with references or personal experience. You can explicitly perform the following conversions: A pointer to any integral type large enough to hold it A value of integral or enumeration type to a pointer c++ Using reinterpret_cast to cast unique_ptr * to unique_ptr * for creating a transformable tree structure One helpful exception is casting a integer-constant to a pointer and accessing the target object, which is useful for manipulation of HW-registers (in C). CUDA C/C++ int2int4 float2 . BoxAdcontent.document.write("