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
void property_map_extras(Class& pm, type >)
{
pm.def("__len__", &py_vector_property_map_length);
typedef typename std::vector<T>::iterator value_iterator;
simple_python_iterator::declare("ValueIterator");
pm.def("__iter__", &py_vector_property_map_values);
}
template
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