[Bf-blender-cvs] [320d601] blender-v2.78-release: Fix T49286: Compilation error with XCode 7.0

Sergey Sharybin noreply at git.blender.org
Wed Sep 14 10:38:35 CEST 2016


Commit: 320d601e012780fdedc1866cf7658a9a6feb1d66
Author: Sergey Sharybin
Date:   Thu Sep 8 09:27:51 2016 +0200
Branches: blender-v2.78-release
https://developer.blender.org/rB320d601e012780fdedc1866cf7658a9a6feb1d66

Fix T49286: Compilation error with XCode 7.0

Weirdly enough, this version of XCode seems to have static_assert()
even when NOT using C++11. This is totally weird and counter intuitive
since static_assert() is supposed to be C++11 onlky feature.

Can XCode stop using future, please? :)

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

M	intern/cycles/util/util_static_assert.h

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

diff --git a/intern/cycles/util/util_static_assert.h b/intern/cycles/util/util_static_assert.h
index 1b94570..033d85e 100644
--- a/intern/cycles/util/util_static_assert.h
+++ b/intern/cycles/util/util_static_assert.h
@@ -25,6 +25,10 @@ CCL_NAMESPACE_BEGIN
 #ifndef __KERNEL_GPU__
 #  if (__cplusplus > 199711L) || (defined(_MSC_VER) && _MSC_VER >= 1800)
 /* C++11 has built-in static_assert() */
+#  elif defined(static_assert)
+/* Some platforms might have static_assert() defined even tho their
+ * C++ support wouldn't be declared to be C++11.
+ */
 #  else  /* C++11 or MSVC2015 */
 template <bool Test> class StaticAssertFailure;
 template <> class StaticAssertFailure<true> {};




More information about the Bf-blender-cvs mailing list