Commit 6a70e32f authored by Tiago Peixoto's avatar Tiago Peixoto

Fix handling of edge index property maps

parent 7d8195d4
......@@ -211,7 +211,8 @@ boost::any prop(const string& name, IndexMap,
}
else
{
typedef typename property_map_types::apply<value_types,IndexMap>::type
typedef typename property_map_types::apply<value_types,IndexMap,
mpl::bool_<true> >::type
properties_t;
bool found = false;
mpl::for_each<properties_t>(lambda::bind<void>(get_static_prop(),
......
......@@ -107,12 +107,20 @@ struct export_edge_property_map
template <class PropertyMap>
void operator()(PropertyMap) const
{
using python::detail::gcc_demangle;
typedef PythonPropertyMap<PropertyMap> pmap_t;
string type_name =
type_names[mpl::find<value_types,
typename pmap_t::value_type>::type::pos::value];
string type_name;
if (is_same<typename mpl::find<value_types,
typename pmap_t::value_type>::type,
typename mpl::end<value_types>::type>::value)
type_name =
gcc_demangle(typeid(typename pmap_t::value_type).name());
else
type_name =
type_names[mpl::find<value_types,typename pmap_t::value_type>
::type::pos::value];
string class_name = _name + "<" + type_name + ">";
python::class_<pmap_t> pclass(class_name.c_str(),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment