Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flat_map] Add std::from_range ctors; remove container ctors
This implements https://wg21.link/D2767R2#wording-monolith by removing the container constructors. The way to "move a vector into the container" (performantly) is to default-construct and then use `fm.replace(std::move(ks), std::move(vs))`. The way to "initialize the set from a range of pairs" (conveniently) is to use the C++20 `from_range` constructor `flat_map(std::from_range, kvs | std::views::as_rvalue)`. Also implement flat_map::insert_range.
- Loading branch information