I am using boost :: multi_index with a data type that I would like to index based on its size. However, the size () member function of this data type is expensive to execute. Does multi_index make it cache the values ββit receives from its key extractors?
For example, if I created a multi_index container with an ordered index with a member key (element.size ()) and inserted an element whose size is located somewhere in the middle of the container, call the member function size () for all the elements that it visits when it views your internal data structure before you find the right insertion point?
c ++ boost multi-index boost-multi-index
vsekhar
source share