Commit 3397cb75 authored by Glen Robertson's avatar Glen Robertson Committed by Commit Bot

Add comment specifying the iteration order of flat_set/flat_tree.

Iteration order was implied but never stated before. We need to rely on
it for correctness. eg. crrev.com/c/2398449

Change-Id: I2050dffb44da68950261db319981537178fea2e8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2407622
Auto-Submit: Glen Robertson <glenrob@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#809781}
parent 0986e1e1
...@@ -36,8 +36,8 @@ struct IsTransparentCompare<T, void_t<typename T::is_transparent>> ...@@ -36,8 +36,8 @@ struct IsTransparentCompare<T, void_t<typename T::is_transparent>>
// Implementation ------------------------------------------------------------- // Implementation -------------------------------------------------------------
// Implementation of a sorted vector for backing flat_set and flat_map. Do not // Implementation for the sorted associative flat_set and flat_map using a
// use directly. // sorted vector as the backing store. Do not use directly.
// //
// The use of "value" in this is like std::map uses, meaning it's the thing // The use of "value" in this is like std::map uses, meaning it's the thing
// contained (in the case of map it's a <Kay, Mapped> pair). The Key is how // contained (in the case of map it's a <Kay, Mapped> pair). The Key is how
...@@ -156,6 +156,9 @@ class flat_tree { ...@@ -156,6 +156,9 @@ class flat_tree {
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Iterators. // Iterators.
//
// Iterators follow the ordering defined by the key comparator used in
// construction of the flat_tree.
iterator begin(); iterator begin();
const_iterator begin() const; const_iterator begin() const;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment