[pointer_container] ptr_map_iterator::key() gone in 1.34 ?

There seems to be a substantial interface change between 1.33 and 1.34 of ptr_map. I'm trying to move a largeish project from 1.33 to 1.34. The only unsolved problem is that it has 21 separate declarations of a ptr_map, each with a dozen or so uses of iterator where *iter has to be replaced with *iter->second and iter->key() has to be replaced with iter->first. The 1.34 documentation at http://www.boost-consulting.com/boost/ doesn't seem to mention this, and my searches can't seem to turn up where this was discussed. I can see why the new interface might be preferred, but can anybody provide a reference to the discussion (or other insight) that led to this code-breaking change? Ideally I'd like my code to work with both 1.33 and 1.34. Any hints on how to do this elegantly? Thanks, Paul Rose

Paul Rose skrev:
There seems to be a substantial interface change between 1.33 and 1.34 of ptr_map.
I'm trying to move a largeish project from 1.33 to 1.34. The only unsolved problem is that it has 21 separate declarations of a ptr_map, each with a dozen or so uses of iterator where *iter has to be replaced with *iter->second and iter->key() has to be replaced with iter->first.
The 1.34 documentation at http://www.boost-consulting.com/boost/ doesn't seem to mention this, and my searches can't seem to turn up where this was discussed.
This is not the proper 1.34 documentation.
I can see why the new interface might be preferred, but can anybody provide a reference to the discussion (or other insight) that led to this code-breaking change?
Better interface compatibility with std::map s.t. algorithms etc. can be reused. The standard interface with std::pair might suck, but it is standard.
Ideally I'd like my code to work with both 1.33 and 1.34. Any hints on how to do this elegantly?
Add your own layer of indirection: namespace my_namespace { template< class PtrMap > typename PtrMap::key_type ptr_map_key( const PtrMap& ) { #ifdef BOOST_1_34 .. -Thorsten

Ideally I'd like my code to work with both 1.33 and 1.34. Any hints
on how to do this elegantly?
Add your own layer of indirection:
namespace my_namespace { template< class PtrMap > typename PtrMap::key_type ptr_map_key( const PtrMap& ) { #ifdef BOOST_1_34 ..
Thank you -- will do.

The 1.34 documentation at http://www.boost-consulting.com/boost/ doesn't seem to mention this, and my searches can't seem to turn up where this was discussed.
This is not the proper 1.34 documentation.
I have since found the proper 1.34 docs and found the "Upgrading from 1.33" note in pointer_container. Thanks again, Paul Rose
participants (2)
-
Paul Rose
-
Thorsten Ottosen