Fix: Build error with clang on windows.
authorRay Molenkamp <github@lazydodo.com>
Sun, 9 Jun 2019 00:10:48 +0000 (18:10 -0600)
committerRay Molenkamp <github@lazydodo.com>
Sun, 9 Jun 2019 00:10:48 +0000 (18:10 -0600)
clang does not seem support the static_assert with
message overload.

source/blender/blenlib/BLI_assert.h

index 7fb91656edbb3ad1a11905caad0af6850722727e..b9cb32a310e84a06997a04bba81601314481a929 100644 (file)
@@ -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);