diff options
author | Martijn Berger <martijn.berger@gmail.com> | 2015-03-29 23:12:22 +0300 |
---|---|---|
committer | Martijn Berger <martijn.berger@gmail.com> | 2015-03-29 23:12:40 +0300 |
commit | f01456aaa4a87cd76feaef50ec822340197f9eda (patch) | |
tree | 5e4147b31def6462158b2ecd269df55ea1679c53 /intern/cycles/util/util_foreach.h | |
parent | 70d9c013257906d3e894907b92e693d1ccebd7fd (diff) |
Optionally use c++11 stuff instead of boost in cycles where possible. We do and continue to depend on boost though
Reviewers: dingto, sergey
Reviewed By: sergey
Subscribers: #cycles
Differential Revision: https://developer.blender.org/D1185
Diffstat (limited to 'intern/cycles/util/util_foreach.h')
-rw-r--r-- | intern/cycles/util/util_foreach.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/intern/cycles/util/util_foreach.h b/intern/cycles/util/util_foreach.h index 065bd33ebd2..4f7337107b3 100644 --- a/intern/cycles/util/util_foreach.h +++ b/intern/cycles/util/util_foreach.h @@ -19,8 +19,12 @@ /* Use Boost to get nice foreach() loops for STL data structures. */ -#include <boost/foreach.hpp> -#define foreach BOOST_FOREACH +#if (__cplusplus > 199711L) || (defined(_MSC_VER) && _MSC_VER >= 1800) +# define foreach(x, y) for(x : y) +#else +# include <boost/foreach.hpp> +# define foreach BOOST_FOREACH +#endif #endif /* __UTIL_FOREACH_H__ */ |