[Bf-blender-cvs] [8ab1fc7a249] experimental-build: Some more tweaking to static assert macro...
Bastien Montagne
noreply at git.blender.org
Thu Nov 23 18:00:48 CET 2017
Commit: 8ab1fc7a24930d3aacd1991a4d19f26dcda1967a
Author: Bastien Montagne
Date: Thu Nov 23 17:59:33 2017 +0100
Branches: experimental-build
https://developer.blender.org/rB8ab1fc7a24930d3aacd1991a4d19f26dcda1967a
Some more tweaking to static assert macro...
===================================================================
M source/blender/blenlib/BLI_utildefines.h
===================================================================
diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h
index dd4dab717bc..ee1acc5afdd 100644
--- a/source/blender/blenlib/BLI_utildefines.h
+++ b/source/blender/blenlib/BLI_utildefines.h
@@ -655,10 +655,9 @@ extern bool BLI_memory_is_zero(const void *arr, const size_t arr_size);
/* C++ can't use _Static_assert, expects static_assert() but c++0x only,
* Coverity also errors out. */
-#if (defined(__cplusplus))
-# define BLI_STATIC_ASSERT(a, msg)
-#elif (!defined(__COVERITY__)) && \
- (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 406)) /* gcc4.6+ only */
+#if (!defined(__cplusplus)) && \
+ (!defined(__COVERITY__)) && \
+ (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 406)) /* gcc4.6+ only */
# define BLI_STATIC_ASSERT(a, msg) __extension__ _Static_assert(a, msg);
#else
/* Code adapted from http://www.pixelbeat.org/programming/gcc/static_assert.html */
More information about the Bf-blender-cvs
mailing list