diff --git a/include/boost/python/indexing/indexing_suite.hpp b/include/boost/python/indexing/indexing_suite.hpp index a49ab684..014757c2 100644 --- a/include/boost/python/indexing/indexing_suite.hpp +++ b/include/boost/python/indexing/indexing_suite.hpp @@ -10,6 +10,7 @@ # include # include # include +# include namespace boost { namespace python { @@ -119,8 +120,9 @@ namespace boost { namespace python { // Hook into the class_ generic visitation .def function register_ptr_to_python(); - Container::iterator(Container::*begin_)() = &Container::begin; - Container::iterator(Container::*end_)() = &Container::end; + typedef typename Container::iterator iterator; + iterator(Container::*begin_)() = &Container::begin; + iterator(Container::*end_)() = &Container::end; cl .def("__len__", base_size) diff --git a/include/boost/python/indexing/vector_indexing_suite.hpp b/include/boost/python/indexing/vector_indexing_suite.hpp index f054c6f8..4c7e2dff 100644 --- a/include/boost/python/indexing/vector_indexing_suite.hpp +++ b/include/boost/python/indexing/vector_indexing_suite.hpp @@ -124,7 +124,7 @@ namespace boost { namespace python { long index = i(); if (index < 0) index += DerivedPolicies::size(container); - if (index >= container.size() || index < 0) + if (index >= long(container.size()) || index < 0) { PyErr_SetString(PyExc_IndexError, "Index out of range"); throw_error_already_set();