Commit ed9fa3ea authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Include No-Op specialization of property map converter

parent 2b25ac58
...@@ -347,12 +347,22 @@ struct convert<string,boost::python::object>::specific_convert<string,boost::pyt ...@@ -347,12 +347,22 @@ struct convert<string,boost::python::object>::specific_convert<string,boost::pyt
{ {
boost::python::extract<string> x(v); boost::python::extract<string> x(v);
if (x.check()) if (x.check())
return x(); return x();
else else
throw boost::bad_lexical_cast(); throw boost::bad_lexical_cast();
} }
}; };
// No op
template <class Type1>
struct convert<Type1, Type1>
{
const Type1& operator()(const Type1& v) const
{
return v;
}
};
// the following class wraps a generic property map, so it can be used as a // the following class wraps a generic property map, so it can be used as a
// property with a given Key and Value type. The keys and values are converted // property with a given Key and Value type. The keys and values are converted
// to the desired Key and Value type, which may cause a performance impact, // to the desired Key and Value type, which may cause a performance impact,
......
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