diff --git a/include/boost/python/suite/indexing/detail/indexing_suite_detail.hpp b/include/boost/python/suite/indexing/detail/indexing_suite_detail.hpp index 34a4096a..bf4fe91c 100644 --- a/include/boost/python/suite/indexing/detail/indexing_suite_detail.hpp +++ b/include/boost/python/suite/indexing/detail/indexing_suite_detail.hpp @@ -11,6 +11,7 @@ # include # include # include +# include # include # include #include @@ -462,13 +463,29 @@ namespace boost { namespace python { namespace detail { { } + template + static object + base_get_item_helper(DataType const& p, mpl::true_) + { + return object(ptr(p)); + } + + template + static object + base_get_item_helper(DataType const& x, mpl::false_) + { + return object(x); + } + static object base_get_item_(back_reference const& container, PyObject* i) { - return object( + return base_get_item_helper( DerivedPolicies::get_item( container.get(), DerivedPolicies:: - convert_index(container.get(), i))); + convert_index(container.get(), i)) + , is_pointer() + ); } static void diff --git a/test/Jamfile b/test/Jamfile index be5edac1..e993bf51 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -162,6 +162,8 @@ bpl-test crossmod_exception [ bpl-test docstring ] [ bpl-test vector_indexing_suite ] +[ bpl-test pointer_vector ] + [ extension map_indexing_suite_ext : map_indexing_suite.cpp int_map_indexing_suite.cpp