[C++-sig] Unable to compile modules using vector_indexing_suite

Andrew Buza apt.buza at gmail.com
Mon Mar 17 22:58:37 CET 2008


Hi Everyone. I hope this is the right place for boost_python usage questions.

I'm having trouble getting anything using vector_indexing_suite to
compile. I don't think it is a problem with configuration since all
the other parts of boost_python I've used are working fine, and the
sample given below (almost identical to one of the example usages in
the documentation) fails to compile as well, so it isn't an error in
usage on my part (I hope!).

The sample I'm using is:

#include <boost/python.hpp>
#include <boost/python/suite/indexing/vector_indexing_suite.hpp>
#include <vector>

using namespace boost::python;

BOOST_PYTHON_MODULE(test)
{
    class_<std::vector<int> >("IntVec")
        .def(vector_indexing_suite<std::vector<int> >())
        ;
}

which is compiled with:

C:\>cl
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.6030 for 80x86
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.

C:\>cl /nologo /TP /EHsc /IC:\cxx\boost_1_33_1 /IC:\Python24\include
/c src/test.cpp

and gives the following error:

C:\cxx\boost_1_33_1\boost\detail\compressed_pair.hpp(347) : error
C2247: 'boost::python::objects::iterator_range<NextPolicies,Iterator>::next'
not accessible because
'boost::details::compressed_pair_imp<T1,T2,Version>' uses 'private' to
inherit from 'boost::python::objects::iterator_range<NextPolicies,Iterator>::next'

Does anyone have any insight into this problem?



More information about the Cplusplus-sig mailing list