[Bf-blender-cvs] [8452673a018] master: Fix: Build error with clang on windows.

Ray Molenkamp noreply at git.blender.org
Sun Jun 9 02:10:56 CEST 2019


Commit: 8452673a0189b66e79508cf3b6a0d856aee62366
Author: Ray Molenkamp
Date:   Sat Jun 8 18:10:48 2019 -0600
Branches: master
https://developer.blender.org/rB8452673a0189b66e79508cf3b6a0d856aee62366

Fix: Build error with clang on windows.

clang does not seem support the static_assert with
message overload.

===================================================================

M	source/blender/blenlib/BLI_assert.h

===================================================================

diff --git a/source/blender/blenlib/BLI_assert.h b/source/blender/blenlib/BLI_assert.h
index 7fb91656edb..b9cb32a310e 100644
--- a/source/blender/blenlib/BLI_assert.h
+++ b/source/blender/blenlib/BLI_assert.h
@@ -89,7 +89,7 @@ extern "C" {
 #  define BLI_STATIC_ASSERT(a, msg) static_assert(a, msg);
 #elif defined(_MSC_VER)
 /* Visual Studio */
-#  if _MSC_VER > 1910
+#  if (_MSC_VER > 1910) && !defined(__clang__)
 #    define BLI_STATIC_ASSERT(a, msg) static_assert(a, msg);
 #  else
 #    define BLI_STATIC_ASSERT(a, msg) _STATIC_ASSERT(a);



More information about the Bf-blender-cvs mailing list