diff --git a/include/boost/function.hpp b/include/boost/function.hpp index 68a25ab..ef907e0 100644 --- a/include/boost/function.hpp +++ b/include/boost/function.hpp @@ -23,7 +23,7 @@ #include // unary_function, binary_function #include -#include +#include // Include the prologue here so that the use of file-level iteration // in anything that may be included by function_template.hpp doesn't break diff --git a/include/boost/function/function_base.hpp b/include/boost/function/function_base.hpp index 841affb..b20a523 100644 --- a/include/boost/function/function_base.hpp +++ b/include/boost/function/function_base.hpp @@ -26,13 +26,13 @@ #include #include #include -#include -#include +#include +#include #include #ifndef BOOST_NO_SFINAE -# include "boost/utility/enable_if.hpp" +#include #else -# include "boost/mpl/bool.hpp" +#include #endif #include #include @@ -50,7 +50,7 @@ #endif // __ICL etc # define BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor,Type) \ - typename ::boost::enable_if_c< \ + typename ::boost::enable_if_< \ !(::boost::is_integral::value), \ Type>::type @@ -152,15 +152,15 @@ namespace boost { template class get_function_tag { - typedef typename mpl::if_c<(is_pointer::value), + typedef typename conditional<(is_pointer::value), function_ptr_tag, function_obj_tag>::type ptr_or_obj_tag; - typedef typename mpl::if_c<(is_member_pointer::value), + typedef typename conditional<(is_member_pointer::value), member_ptr_tag, ptr_or_obj_tag>::type ptr_or_obj_or_mem_tag; - typedef typename mpl::if_c<(is_reference_wrapper::value), + typedef typename conditional<(is_reference_wrapper::value), function_obj_ref_tag, ptr_or_obj_or_mem_tag>::type or_ref_tag; @@ -328,7 +328,7 @@ namespace boost { // Function objects that fit in the small-object buffer. static inline void manager(const function_buffer& in_buffer, function_buffer& out_buffer, - functor_manager_operation_type op, mpl::true_) + functor_manager_operation_type op, true_type) { functor_manager_common::manage_small(in_buffer,out_buffer,op); } @@ -336,7 +336,7 @@ namespace boost { // Function objects that require heap allocation static inline void manager(const function_buffer& in_buffer, function_buffer& out_buffer, - functor_manager_operation_type op, mpl::false_) + functor_manager_operation_type op, false_type) { if (op == clone_functor_tag) { // Clone the functor @@ -377,7 +377,7 @@ namespace boost { functor_manager_operation_type op, function_obj_tag) { manager(in_buffer, out_buffer, op, - mpl::bool_<(function_allows_small_object_optimization::value)>()); + integral_constant::value)>()); } // For member pointers, we use the small-object optimization buffer. @@ -385,7 +385,7 @@ namespace boost { manager(const function_buffer& in_buffer, function_buffer& out_buffer, functor_manager_operation_type op, member_ptr_tag) { - manager(in_buffer, out_buffer, op, mpl::true_()); + manager(in_buffer, out_buffer, op, true_type()); } public: @@ -427,7 +427,7 @@ namespace boost { // Function objects that fit in the small-object buffer. static inline void manager(const function_buffer& in_buffer, function_buffer& out_buffer, - functor_manager_operation_type op, mpl::true_) + functor_manager_operation_type op, true_type) { functor_manager_common::manage_small(in_buffer,out_buffer,op); } @@ -435,7 +435,7 @@ namespace boost { // Function objects that require heap allocation static inline void manager(const function_buffer& in_buffer, function_buffer& out_buffer, - functor_manager_operation_type op, mpl::false_) + functor_manager_operation_type op, false_type) { typedef functor_wrapper functor_wrapper_type; #if defined(BOOST_NO_CXX11_ALLOCATOR) @@ -499,7 +499,7 @@ namespace boost { functor_manager_operation_type op, function_obj_tag) { manager(in_buffer, out_buffer, op, - mpl::bool_<(function_allows_small_object_optimization::value)>()); + integral_constant::value)>()); } public: @@ -530,24 +530,24 @@ namespace boost { #ifdef BOOST_NO_SFINAE // These routines perform comparisons between a Boost.Function // object and an arbitrary function object (when the last - // parameter is mpl::bool_) or against zero (when the - // last parameter is mpl::bool_). They are only necessary + // parameter is false_type) or against zero (when the + // last parameter is true_type). They are only necessary // for compilers that don't support SFINAE. template bool - compare_equal(const Function& f, const Functor&, int, mpl::bool_) + compare_equal(const Function& f, const Functor&, int, true_type) { return f.empty(); } template bool compare_not_equal(const Function& f, const Functor&, int, - mpl::bool_) + true_type) { return !f.empty(); } template bool compare_equal(const Function& f, const Functor& g, long, - mpl::bool_) + false_type) { if (const Functor* fp = f.template target()) return function_equal(*fp, g); @@ -557,7 +557,7 @@ namespace boost { template bool compare_equal(const Function& f, const reference_wrapper& g, - int, mpl::bool_) + int, false_type) { if (const Functor* fp = f.template target()) return fp == g.get_pointer(); @@ -567,7 +567,7 @@ namespace boost { template bool compare_not_equal(const Function& f, const Functor& g, long, - mpl::bool_) + false_type) { if (const Functor* fp = f.template target()) return !function_equal(*fp, g); @@ -578,7 +578,7 @@ namespace boost { bool compare_not_equal(const Function& f, const reference_wrapper& g, int, - mpl::bool_) + false_type) { if (const Functor* fp = f.template target()) return fp != g.get_pointer(); @@ -750,28 +750,28 @@ inline bool operator!=(detail::function::useless_clear_type*, template inline bool operator==(const function_base& f, Functor g) { - typedef mpl::bool_<(is_integral::value)> integral; + typedef integral_constant::value)> integral; return detail::function::compare_equal(f, g, 0, integral()); } template inline bool operator==(Functor g, const function_base& f) { - typedef mpl::bool_<(is_integral::value)> integral; + typedef integral_constant::value)> integral; return detail::function::compare_equal(f, g, 0, integral()); } template inline bool operator!=(const function_base& f, Functor g) { - typedef mpl::bool_<(is_integral::value)> integral; + typedef integral_constant::value)> integral; return detail::function::compare_not_equal(f, g, 0, integral()); } template inline bool operator!=(Functor g, const function_base& f) { - typedef mpl::bool_<(is_integral::value)> integral; + typedef integral_constant::value)> integral; return detail::function::compare_not_equal(f, g, 0, integral()); } #else diff --git a/include/boost/function/function_template.hpp b/include/boost/function/function_template.hpp index 177b60a..e4ebb30 100644 --- a/include/boost/function/function_template.hpp +++ b/include/boost/function/function_template.hpp @@ -11,7 +11,7 @@ // Note: this header is a header template and must NOT have multiple-inclusion // protection. #include -#include +#include #if defined(BOOST_MSVC) # pragma warning( push ) @@ -240,7 +240,7 @@ namespace boost { > struct BOOST_FUNCTION_GET_FUNCTION_INVOKER { - typedef typename mpl::if_c<(is_void::value), + typedef typename conditional<(is_void::value), BOOST_FUNCTION_VOID_FUNCTION_INVOKER< FunctionPtr, R BOOST_FUNCTION_COMMA @@ -261,7 +261,7 @@ namespace boost { > struct BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER { - typedef typename mpl::if_c<(is_void::value), + typedef typename conditional<(is_void::value), BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER< FunctionObj, R BOOST_FUNCTION_COMMA @@ -282,7 +282,7 @@ namespace boost { > struct BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER { - typedef typename mpl::if_c<(is_void::value), + typedef typename conditional<(is_void::value), BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER< FunctionObj, R BOOST_FUNCTION_COMMA @@ -305,7 +305,7 @@ namespace boost { > struct BOOST_FUNCTION_GET_MEMBER_INVOKER { - typedef typename mpl::if_c<(is_void::value), + typedef typename conditional<(is_void::value), BOOST_FUNCTION_VOID_MEMBER_INVOKER< MemberPtr, R BOOST_FUNCTION_COMMA @@ -567,27 +567,27 @@ namespace boost { // Assign to a function object using the small object optimization template void - assign_functor(FunctionObj f, function_buffer& functor, mpl::true_) const + assign_functor(FunctionObj f, function_buffer& functor, true_type) const { new (reinterpret_cast(functor.data)) FunctionObj(f); } template void - assign_functor_a(FunctionObj f, function_buffer& functor, Allocator, mpl::true_) const + assign_functor_a(FunctionObj f, function_buffer& functor, Allocator, true_type) const { - assign_functor(f,functor,mpl::true_()); + assign_functor(f,functor,true_type()); } // Assign to a function object allocated on the heap. template void - assign_functor(FunctionObj f, function_buffer& functor, mpl::false_) const + assign_functor(FunctionObj f, function_buffer& functor, false_type) const { functor.members.obj_ptr = new FunctionObj(f); } template void - assign_functor_a(FunctionObj f, function_buffer& functor, Allocator a, mpl::false_) const + assign_functor_a(FunctionObj f, function_buffer& functor, Allocator a, false_type) const { typedef functor_wrapper functor_wrapper_type; #if defined(BOOST_NO_CXX11_ALLOCATOR) @@ -615,7 +615,7 @@ namespace boost { { if (!boost::detail::function::has_empty_target(boost::addressof(f))) { assign_functor(f, functor, - mpl::bool_<(function_allows_small_object_optimization::value)>()); + integral_constant::value)>()); return true; } else { return false; @@ -627,7 +627,7 @@ namespace boost { { if (!boost::detail::function::has_empty_target(boost::addressof(f))) { assign_functor_a(f, functor, a, - mpl::bool_<(function_allows_small_object_optimization::value)>()); + integral_constant::value)>()); return true; } else { return false; @@ -715,7 +715,7 @@ namespace boost { template BOOST_FUNCTION_FUNCTION(Functor BOOST_FUNCTION_TARGET_FIX(const &) f #ifndef BOOST_NO_SFINAE - ,typename boost::enable_if_c< + ,typename boost::enable_if_< !(is_integral::value), int>::type = 0 #endif // BOOST_NO_SFINAE @@ -727,7 +727,7 @@ namespace boost { template BOOST_FUNCTION_FUNCTION(Functor BOOST_FUNCTION_TARGET_FIX(const &) f, Allocator a #ifndef BOOST_NO_SFINAE - ,typename boost::enable_if_c< + ,typename boost::enable_if_< !(is_integral::value), int>::type = 0 #endif // BOOST_NO_SFINAE @@ -776,7 +776,7 @@ namespace boost { // construct. template #ifndef BOOST_NO_SFINAE - typename boost::enable_if_c< + typename boost::enable_if_< !(is_integral::value), BOOST_FUNCTION_FUNCTION&>::type #else @@ -1066,7 +1066,7 @@ public: template function(Functor f #ifndef BOOST_NO_SFINAE - ,typename boost::enable_if_c< + ,typename boost::enable_if_< !(is_integral::value), int>::type = 0 #endif @@ -1077,7 +1077,7 @@ public: template function(Functor f, Allocator a #ifndef BOOST_NO_SFINAE - ,typename boost::enable_if_c< + ,typename boost::enable_if_< !(is_integral::value), int>::type = 0 #endif @@ -1116,7 +1116,7 @@ public: template #ifndef BOOST_NO_SFINAE - typename boost::enable_if_c< + typename boost::enable_if_< !(is_integral::value), self_type&>::type #else diff --git a/test/contains2_test.cpp b/test/contains2_test.cpp index cf6d479..9cfa5c3 100644 --- a/test/contains2_test.cpp +++ b/test/contains2_test.cpp @@ -9,7 +9,7 @@ // http://www.boost.org/LICENSE_1_0.txt) #include -#include +#include static int forty_two() { diff --git a/test/mem_fun_cxx98.cpp b/test/mem_fun_cxx98.cpp index c289791..9274036 100644 --- a/test/mem_fun_cxx98.cpp +++ b/test/mem_fun_cxx98.cpp @@ -10,7 +10,7 @@ #include -#include +#include #include #include diff --git a/test/mem_fun_portable.cpp b/test/mem_fun_portable.cpp index 0251339..e12fd08 100644 --- a/test/mem_fun_portable.cpp +++ b/test/mem_fun_portable.cpp @@ -10,7 +10,7 @@ #include -#include +#include #include #include