Created on 2025-12-22.00:00:00 last changed 1 week ago
Proposed resolution:
This wording is relative to N5032.
Modify [flat.set.modifiers] as indicated:
template<container-compatible-range<value_type> R> constexpr void insert_range(R&& rg);-10- Effects: Adds elements to
cas if by:ranges::for_each(rg, [&](value_typeauto&&e) { c.insert(c.end(), std::movestd::forward<decltype(e)>(e)); });
Modify [flat.multiset.modifiers] as indicated:
template<container-compatible-range<value_type> R> void insert_range(R&& rg);-9- Effects: Adds elements to
cas if by:ranges::for_each(rg, [&](value_typeauto&&e) { c.insert(c.end(), std::movestd::forward<decltype(e)>(e)); });
The function adds elements via:
ranges::for_each(rg, [&](auto&& e) {
c.insert(c.end(), std::forward<decltype(e)>(e));
});
Here, `e` is an element of the input range.
However, this can lead to ambiguity when `e` can also be converted to `initializer_list`, as `vector::insert` has an overload ofinsert(const_iterator, initializer_list<T>).
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2025-12-22 14:27:41 | admin | set | messages: + msg15844 |
| 2025-12-22 00:00:00 | admin | create | |