SDL_static_cast - Handle a Static Cast properly whether using C or C++.
Contents
Availability
This macro is available since SDL 3.2.0.
Description
If compiled as C++, this macro offers a proper C++ static_cast<>.
If compiled as C, this macro does a normal C-style cast.
This is helpful to avoid compiler warnings in C++.
Header File
Defined in SDL3/SDL_stdinc.h
Name
SDL_static_cast - Handle a Static Cast properly whether using C or C++.
Return Value
Returns expression , cast to type .
See Also
•(3), SDL_reinterpret_cast(3), •(3), SDL_const_cast(3) Simple Directmedia Layer SDL 3.2.10 SDL_static_cast(3)
Synopsis
#include"SDL3/SDL.h"#defineSDL_static_cast(type,expression)static_cast<type>(expression)/*or`((type)(expression))`inC*/
Thread Safety
It is safe to call this macro from any thread.
