[python][container] map_indexing_suite for flat_map

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[python][container] map_indexing_suite for flat_map

Boost - Users mailing list

Hello,

I've tried to adapt

using myfm = boost::container::flat_map<const T*, V>;

with boost::python::map_indexing_suite

  class_< myfm, myfm*  >("myfm")
    .def( map_indexing_suite<myfm>{} )
  ;

I get a compile errors:


/usr/include/boost/python/detail/invoke.hpp:75:14: error: no match for call to ‘(const boost::python::detail::specify_a_return_value_policy_to_wrap_functions_returning<const T*>) (const T*)’
...
Caller = boost::python::detail::caller<const T* (*)(std::pair<const T*, V>&), default_call_policies ...>

I would suspect that there is some function that returns the key_type of the flat_map and takes a single argument of the value_type, but I can't find any.

If there's one, I would need pick a return value policy for it.

MM



_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users