From f01456aaa4a87cd76feaef50ec822340197f9eda Mon Sep 17 00:00:00 2001 From: Martijn Berger Date: Sun, 29 Mar 2015 22:12:22 +0200 Subject: 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 --- intern/cycles/util/util_function.h | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'intern/cycles/util/util_function.h') diff --git a/intern/cycles/util/util_function.h b/intern/cycles/util/util_function.h index 7a312efaad7..83c07ae06a8 100644 --- a/intern/cycles/util/util_function.h +++ b/intern/cycles/util/util_function.h @@ -17,14 +17,31 @@ #ifndef __UTIL_FUNCTION_H__ #define __UTIL_FUNCTION_H__ -#include -#include +#if (__cplusplus > 199711L) || (defined(_MSC_VER) && _MSC_VER >= 1800) +# include +#else +# include +# include +#endif CCL_NAMESPACE_BEGIN +#if (__cplusplus > 199711L) || (defined(_MSC_VER) && _MSC_VER >= 1800) +# define function_bind std::bind +using std::function; +using std::placeholders::_1; +using std::placeholders::_2; +using std::placeholders::_3; +using std::placeholders::_4; +using std::placeholders::_5; +using std::placeholders::_6; +using std::placeholders::_7; +using std::placeholders::_8; +using std::placeholders::_9; +#else using boost::function; -#define function_bind boost::bind - +# define function_bind boost::bind +#endif CCL_NAMESPACE_END #endif /* __UTIL_FUNCTION_H__ */ -- cgit v1.2.3