|
Boost Users : |
From: George Sakkis (george.sakkis_at_[hidden])
Date: 2007-02-23 10:42:01
I'm trying to build BGL-Python from SVN. I managed to build it
successfully on Windows (VC 8.0) but I'm having problems with gcc 3.4
on Linux; although it does compile, it doesn't expose in Python two
property map methods, __len__ and __iter__. I think I narrowed it down
to the non-selection of a template specialization:
// boost/graph/python/property_map.hpp
namespace boost { namespace graph { namespace python { namespace detail {
/ * skip other stuff */
template<typename Class, typename T, typename IndexMap>
void property_map_extras(Class& pm, type<vector_property_map<T, IndexMap> >)
{
pm.def("__len__", &py_vector_property_map_length<T, IndexMap>);
typedef typename std::vector<T>::iterator value_iterator;
simple_python_iterator<value_iterator>::declare("ValueIterator");
pm.def("__iter__", &py_vector_property_map_values<T, IndexMap>);
}
template<typename Class, typename PropertyMap>
inline void property_map_extras(Class&, type<PropertyMap>) { }
} // end namespace detail
*/
So for __len__ and __iter__ to be included, the first overloading of
property_map_extras must be called. That's what happens with VC 8.0
(in fact I can remove the second empty function and compiles just
fine), but gcc selects the second one. Can anyone help and/or
reproduce it ?
Thanks,
George
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net