Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-08-01 20:31:27 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-08-01 20:44:32 +0300
commite50a3dd4c4e9a9898df31e444d1002770b4efb9c (patch)
tree9e49107f45643afef9f0d6ed2b7538ef7852ceac
parent9336aef4eb279804ee5cccec63d818810233e6c5 (diff)
Fix T56197: Cycles OpenCL build error after recent changes.
-rw-r--r--intern/cycles/util/util_defines.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/intern/cycles/util/util_defines.h b/intern/cycles/util/util_defines.h
index 1a09f659eb1..8bce4aca699 100644
--- a/intern/cycles/util/util_defines.h
+++ b/intern/cycles/util/util_defines.h
@@ -88,9 +88,13 @@
#endif
#if defined(__GNUC__) || defined(__clang__)
+# if defined(__cplusplus)
/* Some magic to be sure we don't have reference in the type. */
template<typename T> static inline T decltype_helper(T x) { return x; }
-# define TYPEOF(x) decltype(decltype_helper(x))
+# define TYPEOF(x) decltype(decltype_helper(x))
+# else
+# define TYPEOF(x) typeof(x)
+# endif
#endif
/* Causes warning: