Subject: [Boost-users] [container][flat_map] Internal storage for flat_maps / flat_sets
From: Aaron Levy (aaron.levy_at_[hidden])
Date: 2014-09-13 05:00:58


What is the type of the underlying contiguous storage used by the flat_map / flat_set containers? Does the following code make sense:

flat_map<T> container;
...
if (container.size() > 0) {
  const T& elem = *(container.begin());
  const T& elem_1 = *(container.begin() + 1);
  assert(&elem_1 == &elem + 1);
}

Aaron