-
Book Overview & Buying
-
Table Of Contents
Data Structures and Algorithms with the C++ STL
By :
std::flat_multiset is a container that was introduced in the C++ STL that’s designed to store elements in a sorted order. Unlike std::multiset, which is typically implemented as a red-black tree, std::flat_multiset stores its elements in a contiguous memory block, similar to a std::vector container. This design choice offers improved cache performance due to data locality, making it efficient for scenarios where the container is not frequently modified after being filled.
Std::flat_multiset is a container that stores elements in a sorted array, similar to std::flat_set, but allows for multiple occurrences of equivalent elements.
This container offers the following:
It’s especially suitable in the following scenarios: