¡@

Home 

c++ Programming Glossary: magic_cast

Aliasing `T*` with `char*` is allowed. Is it also allowed the other way around?

http://stackoverflow.com/questions/12612488/aliasing-t-with-char-is-allowed-is-it-also-allowed-the-other-way-around

rules let's assume that an implementation provides us with magic_cast T p which 'somehow' converts a pointer to another pointer type... snippets are correct substituting reinterpret_cast with magic_cast because no glvalues are involved whatsoever with the results.. no glvalues are involved whatsoever with the results of magic_cast . Here is a snippet that appears to incorrectly use magic_cast..