diff --git a/include/boost/python/suite/indexing/container_proxy.hpp b/include/boost/python/suite/indexing/container_proxy.hpp index cb76eece..65911d94 100755 --- a/include/boost/python/suite/indexing/container_proxy.hpp +++ b/include/boost/python/suite/indexing/container_proxy.hpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -271,7 +272,7 @@ namespace boost { namespace python { namespace indexing { ::replace (size_type index, raw_value_type const ©) { detach_proxy (index); - raw_container().at(index) = copy; + raw_container().BOOST_INDEXING_AT (index) = copy; } template diff --git a/include/boost/python/suite/indexing/shared_proxy_impl.hpp b/include/boost/python/suite/indexing/shared_proxy_impl.hpp index 2df5add3..b14aad91 100755 --- a/include/boost/python/suite/indexing/shared_proxy_impl.hpp +++ b/include/boost/python/suite/indexing/shared_proxy_impl.hpp @@ -25,6 +25,7 @@ #define BOOST_PYTHON_INDEXING_SHARED_PROXY_IMPL_HPP #include +#include namespace boost { namespace python { namespace indexing { template @@ -85,7 +86,7 @@ namespace boost { namespace python { namespace indexing { shared_proxy_impl::operator* () const { return m_owner_ptr - ? m_owner_ptr->raw_container().at (m_index) + ? m_owner_ptr->raw_container().BOOST_INDEXING_AT (m_index) : *m_element_ptr; } diff --git a/include/boost/python/suite/indexing/workaround.hpp b/include/boost/python/suite/indexing/workaround.hpp new file mode 100755 index 00000000..fea2cd5a --- /dev/null +++ b/include/boost/python/suite/indexing/workaround.hpp @@ -0,0 +1,33 @@ +// -*- mode:c++ -*- +// +// Header file workaround.hpp +// +// Indexing-specific workarounds for compiler problems. +// +// Copyright (c) 2003 Raoul M. Gough +// +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy +// at http://www.boost.org/LICENSE_1_0.txt) +// +// History +// ======= +// 2003/10/21 rmg File creation +// +// $Id$ +// + +#ifndef BOOST_PYTHON_INDEXING_WORKAROUND_HPP +#define BOOST_PYTHON_INDEXING_WORKAROUND_HPP + +#include + +# if (BOOST_WORKAROUND (__GNUC__, < 3)) +# // gcc versions before 3 (like 2.95.3) don't have the "at" member +# // function in std::vector or std::deque +# define BOOST_INDEXING_AT operator[] +# else +# define BOOST_INDEXING_AT at +# endif + +#endif // BOOST_PYTHON_INDEXING_WORKAROUND_HPP