std::ranges::adjacent_transform_view<V,F,N>::reserve_hint - cppreference.com (original) (raw)

constexpr auto reserve_hint() requires ranges::approximately_sized_range</*InnerView*/> (1) (since C++26)
constexpr auto reserve_hint() const requires ranges::approximately_sized_range<const /*InnerView*/> (2) (since C++26)

Equivalent to return _[inner](../adjacent%5Ftransform%5Fview.html#inner "cpp/ranges/adjacent transform view")_.reserve_hint();.

[edit] Return value

The approximate size of the resulting range.

[edit] Notes

Feature-test macro Value Std Feature
__cpp_lib_ranges_reserve_hint 202502L (C++26) ranges::approximately_sized_range and reserve_hint (1,2)

[edit] Example

[edit] See also

| | returns the number of elements, provided only if the underlying (adapted) range satisfies sized_range (public member function) [edit] | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |