Oh ok. Thank you for this hint.

However, I changed to indexing suite version 2 and I got the following lines at the beginning of the generated files:

// This file has been generated by Py++.

#include "boost/python.hpp"

#include "boost/python/suite/indexing/value_traits.hpp"

#include "boost/python/suite/indexing/container_suite.hpp"

#include "boost/python/suite/indexing/vector.hpp"
 
"value_traits.hpp" is not part of the Boost Python library and should be provided by Py++ (cf. http://www.language-binding.net/pyplusplus/documentation/containers.html#indexing-suite-version-2-installation).

Did I miss something??


2009/12/6 Roman Yakovenko <roman.yakovenko@gmail.com>
On Sun, Dec 6, 2009 at 4:23 PM, Romain CHANU <romainchanu@gmail.com> wrote:
> Hi,
> I am using Py++ to generate the bindings for a C++ class using a vector of
> objects (i.e std::vector<MyObject>)
> I got this error:
> "the next line of code will not compile, because "::MyObject" does not have
> operator== !"
> Could anyone tell me why I need to define this boolean operator?

Do you use indexing suite, that comes with boost? If so, you need this
operator for "contains", "index" and other functionality.
You can switch to indexing suite v2 and than you will not have to
define the operator.

--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/