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:
Diffstat (limited to 'intern/cycles/util/util_defines.h')
-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: