Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenlib/BLI_assert.h
| Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | |||||
| # define BLI_assert_msg(a, msg) ((void)0) | # define BLI_assert_msg(a, msg) ((void)0) | ||||
| #endif | #endif | ||||
| #if defined(__cplusplus) | #if defined(__cplusplus) | ||||
| /* C++11 */ | /* C++11 */ | ||||
| # define BLI_STATIC_ASSERT(a, msg) static_assert(a, msg); | # define BLI_STATIC_ASSERT(a, msg) static_assert(a, msg); | ||||
| #elif defined(_MSC_VER) | #elif defined(_MSC_VER) | ||||
| /* Visual Studio */ | /* Visual Studio */ | ||||
| # if (_MSC_VER > 1910) && !defined(__clang__) | # if !defined(__clang__) | ||||
| # define BLI_STATIC_ASSERT(a, msg) static_assert(a, msg); | # define BLI_STATIC_ASSERT(a, msg) static_assert(a, msg); | ||||
| # else | # else | ||||
| # define BLI_STATIC_ASSERT(a, msg) _STATIC_ASSERT(a); | # define BLI_STATIC_ASSERT(a, msg) _STATIC_ASSERT(a); | ||||
| # endif | # endif | ||||
| #elif defined(__COVERITY__) | #elif defined(__COVERITY__) | ||||
| /* Workaround error with COVERITY. */ | /* Workaround error with COVERITY. */ | ||||
| # define BLI_STATIC_ASSERT(a, msg) | # define BLI_STATIC_ASSERT(a, msg) | ||||
| #elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) | #elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) | ||||
| Show All 24 Lines | |||||