From fe0b59f559ea02ab0c131cc067d5aeb67d5a2302 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Thu, 7 Aug 2003 12:29:54 +0000 Subject: [PATCH] some trivial fixes. [SVN r19485] --- .../boost/python/indexing/indexing_suite.hpp | 40 +++++++++---------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/include/boost/python/indexing/indexing_suite.hpp b/include/boost/python/indexing/indexing_suite.hpp index e8ae1d91..3bbf6152 100644 --- a/include/boost/python/indexing/indexing_suite.hpp +++ b/include/boost/python/indexing/indexing_suite.hpp @@ -12,6 +12,8 @@ # include # include # include +# include +# include namespace boost { namespace python { @@ -112,34 +114,28 @@ namespace boost { namespace python { { private: - typedef boost::mpl::or_< - boost::mpl::bool_ - , boost::mpl::or_< - boost::is_integral - , boost::is_float - , boost::is_pointer - , boost::is_member_pointer - , boost::is_enum - > - > no_proxy; + typedef mpl::or_< + mpl::bool_ + , mpl::not_ > > + no_proxy; typedef detail::container_element container_element_t; - typedef typename boost::mpl::if_< - no_proxy - , iterator - , iterator > >::type + typedef typename mpl::if_< + no_proxy + , iterator + , iterator > >::type def_iterator; static void - register_container_element(boost::mpl::false_) + register_container_element(mpl::false_) { register_ptr_to_python(); } static void - register_container_element(boost::mpl::true_) + register_container_element(mpl::true_) { } @@ -169,7 +165,7 @@ namespace boost { namespace python { static object base_get_item_( back_reference const& container, - PyObject* i, boost::mpl::false_) + PyObject* i, mpl::false_) { // Proxy Index idx = DerivedPolicies::convert_index(container.get(), i); @@ -192,7 +188,7 @@ namespace boost { namespace python { static object base_get_item_( back_reference const& container, - PyObject* i, boost::mpl::true_) + PyObject* i, mpl::true_) { // No Proxy return object( @@ -276,7 +272,7 @@ namespace boost { namespace python { static void base_replace_indexes( Container& container, Index from, - Index to, Index n, boost::mpl::false_) + Index to, Index n, mpl::false_) { // Proxy container_element_t::get_links().replace(container, from, to, n); @@ -285,14 +281,14 @@ namespace boost { namespace python { static void base_replace_indexes( Container& container, Index from, - Index to, Index n, boost::mpl::true_) + Index to, Index n, mpl::true_) { // No Proxy } static void base_erase_indexes( - Container& container, Index from, Index to, boost::mpl::false_) + Container& container, Index from, Index to, mpl::false_) { // Proxy container_element_t::get_links().erase(container, from, to); @@ -300,7 +296,7 @@ namespace boost { namespace python { static void base_erase_indexes( - Container& container, Index from, Index to, boost::mpl::true_) + Container& container, Index from, Index to, mpl::true_) { // No Proxy }