0

I'm trying to wrap a boost::unordered_map using the map_indexing_suite utility in boost python. However, anytime I attempt to do so, I'm encountering the error

Error   26  error C2039: 'key_comp' : is not a member of 'boost::unordered::unordered_map<K,T>' c:\programming_libraries\cpp_libraries\boost_1_49_0\boost\python\suite\indexing\map_indexing_suite.hpp  155

Here's the wrapping I'm doing

class_<boost::unordered_map<std::string, boost::shared_ptr<Character::BaseCharacter> > >("BasePartyMemberMap")
                .def(map_indexing_suite<boost::unordered_map<std::string, boost::shared_ptr<Character::BaseCharacter> > >())
                ;

I'm assuming this has something to do with the unordered_map being used in conjunction with the shared_ptr. If I use an std::map it works correctly. I was hoping someone could tell me what the issue is and if it's resolvable. I'd rather not switch the structure to an std::map if I can avoid it.

Megatron
  • 2,871
  • 4
  • 40
  • 58

1 Answers1

3

Boost.Python does not support std::unordered_map and movement semantics till v.1.55 (see Boost Version 1.55.0 Release Notes, "Multi-index Containers" section). So you can either use latest version or imlement one of the next:

luart
  • 1,383
  • 1
  • 18
  • 25
  • luart, I can't see the release notes you're referring to in 1.55 re boost::python – MMM Sep 29 '15 at 12:25