|
Boost Users : |
Subject: Re: [Boost-users] Container with insertion order
From: Igor R (boost.lists_at_[hidden])
Date: 2011-12-04 03:51:51
>> By the way, why don't you just inherit from multi_index_container and
>> add [] operator?
>> MIC itself already has STL-complient interace, so trying to rewrite it
>> is hardly worth the effort.
>> The following is your code, but with inheritance:
>>
>
> I have already written a lot of code that uses std::map. I would like to
> replace std::map with my class Ordered_Map without changing my code. This is
> possible his example?
Yes, it's possible.
What I mean is that in your case it's much simpler to extend MIC's
interface, than to write an adapter from scratch.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net