Created on 2026-03-24.00:00:00 last changed 6 days ago
Proposed resolution:
This wording is relative to N5032.
Modify [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_));
[ Croydon 2026-03-24; move to Immediate ]
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.
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2026-03-24 17:28:25 | admin | set | messages: + msg16060 |
| 2026-03-24 17:28:25 | admin | set | status: new -> immediate |
| 2026-03-24 15:18:18 | admin | set | messages: + msg16052 |
| 2026-03-24 00:00:00 | admin | create | |