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:
parent
1148532894
commit
b068b7d959
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue