DOKK / manpages / debian 13 / libsdl3-doc / SDL_reinterpret_cast.3.en
SDL_reinterpret_cast(3) SDL3 FUNCTIONS SDL_reinterpret_cast(3)

SDL_reinterpret_cast - Handle a Reinterpret Cast properly whether using C or C++.

Defined in SDL3/SDL_stdinc.h

#include "SDL3/SDL.h"
#define SDL_reinterpret_cast(type, expression) reinterpret_cast<type>(expression)  /* or `((type)(expression))` in C */

If compiled as C++, this macro offers a proper C++ reinterpret_cast<>.

If compiled as C, this macro does a normal C-style cast.

This is helpful to avoid compiler warnings in C++.

Returns expression , cast to type .

It is safe to call this macro from any thread.

This macro is available since SDL 3.2.0.

(3), SDL_static_cast(3), (3), SDL_const_cast(3)

SDL 3.2.10 Simple Directmedia Layer