I would like to second this question.

Several times recently, I have needed to wrap STL-like containers that are 
almost-vectors, just different enough that vector_indexing_suite does not work. 
This is a minor PITA with the standard indexing_suite and looks like it will be 
much easier with the new one. Due to technical/political reasons, it is 
difficult for us to use anything not on the mainline, in a numbered boost 
distribution. It would be a big help if this got on the mainline.  

Is there still a good reason not to?

PS: Jakob, I have some code that may help with the 'no operator()== problem":

//Thanks to Andreas Klöckner on "Development of Python/C++ integration" 
<c++-...@python.org> for this code.
template <class T>
class no_compare_indexing_suite : public bp::vector_indexing_suite<T, false, 
no_compare_indexing_suite<T> > 
{
  public:
    static bool contains(T &container, typename T::value_type const &key)
    { 
        PYTHON_ERROR(PyExc_NotImplementedError, "containment checking not 
supported on this container"); 
    } 
};

Just use this where you would otherwise use vector_indexing_suite.

-----Original Message-----
From: cplusplus-sig-bounces+matthew.scouten=tradingtechnologies....@python.org 
[mailto:cplusplus-sig-bounces+matthew.scouten=tradingtechnologies....@python.org]
 On Behalf Of Jakob van Santen
Sent: Saturday, July 11, 2009 4:50 PM
To: cplusplus-sig@python.org
Subject: [C++-sig] Boost.Python indexing suite version 2?

Hello,

While attempting to wrap a vector of objects where the element class  
doesn't define operator()==, I ran across a mention of a "Version 2"  
of the indexing suite from 2003:

http://mail.python.org/pipermail/cplusplus-sig/2003-October/005453.html

While it's mentioned on the Py++ page, it doesn't seem to have made it  
in to the main boost distribution in the intervening 5 years. Can  
anyone tell me what happened to this project?

Thanks,
Jakob van Santen
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to