At first I started using std::multimapmany values with the same key to store, but then I found that it does not preserve the insertion order between values with the same key. This answer claims that this can be done with help boost::multi_index::multi_index_container, but does not give any example. Looking through the documents, there are no examples of such use, and I cannot make heads or tails of how you should use this thing. I came to expect poor documentation from less used libraries, but that takes the cake. Can someone point me to a tutorial or example that shows that it is used the way I want, or maybe even provide an example?
source
share