Boost logo

Boost Users :

Subject: [Boost-users] [python][container] map_indexing_suite for flat_map
From: MM (finjulhich_at_[hidden])
Date: 2018-07-09 02:13:28


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.


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at