This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Immediate status.
reserve_hint function to concat_viewSection: 25.7.18.2 [range.concat.view] Status: Immediate Submitter: Hui Xie Opened: 2026-03-24 Last modified: 2026-03-25
Priority: Not Prioritized
View other active issues in [range.concat.view].
View all other issues in [range.concat.view].
View all issues with Immediate status.
Discussion:
Addresses FR-025-246
LEWG approved the NB comment "FR-025-246 25.7.18.2 Add a reserve_hint function to concat_view" without wording. This issue
proposes the wording.
[Croydon 2026-03-24; move to Immediate]
Proposed resolution:
This wording is relative to N5032.
Modify 25.7.18.2 [range.concat.view] as indicated:
namespace std::ranges {
[…]
template<input_range... Views>
requires (view<Views> && ...) && (sizeof...(Views) > 0) &&
concatable<Views...>
class concat_view : public view_interface<concat_view<Views...>> {
[…]
constexpr auto size() requires (sized_range<Views> && ...);
constexpr auto size() const requires (sized_range<const Views> && ...);
constexpr auto reserve_hint() requires (approximately_sized_range<Views> && ...);
constexpr auto reserve_hint() const requires (approximately_sized_range<const Views> && ...);
};
}
[…]
constexpr auto size() requires (sized_range<Views> && ...);
constexpr auto size() const requires (sized_range<const Views> && ...);
-8- Effects: Equivalent to:
return apply(
[](auto... sizes) {
using CT = make-unsigned-like-t<common_type_t<decltype(sizes)...>>;
return (CT(sizes) + ...);
},
tuple-transform(ranges::size, views_));
constexpr auto reserve_hint() requires (approximately_sized_range<Views> && ...);
constexpr auto reserve_hint() const requires (approximately_sized_range<const Views> && ...);
-9- Effects: Equivalent to:
return apply(
[](auto... sizes) {
using CT = make-unsigned-like-t<common_type_t<decltype(sizes)...>>;
return (CT(sizes) + ...);
},
tuple-transform(ranges::reserve_hint, views_));