
16 Mar
2005
16 Mar
'05
7:45 a.m.
Toon Knapen <toon.knapen@fft.be> writes:
Hi all,
I'm using a rather big std::map which gives good performance but the memory footprint is a bit too big. So I figured to implement an std::map as an std::vector<std::pair<T1,T2>> but thus with the interface of an std::map on top of it.
Can't be done. It has the wrong iterator invalidation properties. You may be able to implement a useful associative container, but it will never be std::map. -- Dave Abrahams Boost Consulting www.boost-consulting.com