0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-23 20:38:20 +02:00

ircd::simt: Add portables for static_assert macro.

This commit is contained in:
Jason Volk 2022-11-04 17:33:05 +00:00
parent 1148532894
commit b068b7d959

View file

@ -35,3 +35,19 @@
#endif
#endif
//
// Compile-time assertion alias
//
#if defined(__OPENCL_VERSION__) \
&& !defined(static_assert) \
&& true
#if (__has_feature(c_static_assert) || __has_extension(c_static_assert))
#define static_assert(...) _Static_assert(__VA_ARGS__)
#else
#define static_assert(...)
#endif
#endif