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:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-02-05 11:09:39 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-02-06 21:19:20 +0300
commitf25f7c803020b9341e49e898abe94917c3235515 (patch)
tree17754b6b7f4d4037ba4cadb2a55657952c1aeb79 /intern/cycles/util/util_set.h
parent7623d3e071e6356ce4519073b1a29d984ba86cd9 (diff)
Cycles: Re-implement some utilities to avoid use of boost
The title says it all actually, the idea is to make Cycles only requiring Boost via 3rd party dependencies like OIIO and OSL. So now there are only few places which still uses Boost: - Foreach, function bindings and threading primitives. Those we can easily get rid with C++11 bump (which seems inevitable sooner or later if we'll want ot use newer LLVM for OSL), - Networking devices There's no quick solution for those currently, but there are some patches around which improves serialization. Reviewers: juicyfruit, mont29, campbellbarton, brecht, dingto Reviewed By: brecht, dingto Differential Revision: https://developer.blender.org/D1764
Diffstat (limited to 'intern/cycles/util/util_set.h')
-rw-r--r--intern/cycles/util/util_set.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/intern/cycles/util/util_set.h b/intern/cycles/util/util_set.h
index c568d60c4bf..c19fa071b37 100644
--- a/intern/cycles/util/util_set.h
+++ b/intern/cycles/util/util_set.h
@@ -21,7 +21,20 @@
#if (__cplusplus > 199711L) || (defined(_MSC_VER) && _MSC_VER >= 1800)
# include <unordered_set>
#else
-# include <boost/tr1/unordered_set.hpp>
+# if defined(CYCLES_TR1_UNORDERED_MAP)
+# include <tr1/unordered_set>
+# endif
+# if defined(CYCLES_STD_UNORDERED_MAP) || \
+ defined(CYCLES_STD_UNORDERED_MAP_IN_TR1_NAMESPACE)
+# include <unordered_set>
+# endif
+# if !defined(CYCLES_NO_UNORDERED_MAP) && \
+ !defined(CYCLES_TR1_UNORDERED_MAP) && \
+ !defined(CYCLES_STD_UNORDERED_MAP) && \
+ !defined(CYCLES_STD_UNORDERED_MAP_IN_TR1_NAMESPACE)
+# error One of: CYCLES_NO_UNORDERED_MAP, CYCLES_TR1_UNORDERED_MAP,\
+ CYCLES_STD_UNORDERED_MAP, CYCLES_STD_UNORDERED_MAP_IN_TR1_NAMESPACE must be defined! // NOLINT
+# endif
#endif
#if defined(_MSC_VER) && (_MSC_VER >= 1900)
@@ -34,7 +47,15 @@ using std::set;
#if (__cplusplus > 199711L) || (defined(_MSC_VER) && _MSC_VER >= 1800)
using std::unordered_set;
#else
+# if defined(CYCLES_NO_UNORDERED_MAP)
+typedef std::set unordered_set;
+# endif
+# if defined(CYCLES_TR1_UNORDERED_MAP) || defined(CYCLES_STD_UNORDERED_MAP_IN_TR1_NAMESPACE)
using std::tr1::unordered_set;
+# endif
+# if defined(CYCLES_STD_UNORDERED_MAP)
+using std::unordered_set;
+# endif
#endif
CCL_NAMESPACE_END