std::ranges...::value_type(3)
π std::ranges...::value_type π
okay so bestie, we're in the C++ Standard Libary manual β yes, that's the manual name and that's how it's spelled in the header, and honestly? iconic β and this page is all about std::ranges::chunk_view::outer-iterator::value_type. stay with me, it's niche but it slays.
πΈ NAME πΈ
std::ranges::chunk_view::outer-iterator::value_type β std::ranges::chunk_view::outer-iterator::value_type.
β¨ Synopsis β¨
Defined in header <ranges>
struct value_type : view_interface<value_type> (since C++23)
A value type of the iterator chunk_view::outer-iterator, formed when V models input_range.
π Member functions π
π the ones it brings itself
- constructor β constructs an
value_type(C++23) β public member function. - begin β returns the beginning
chunk_view::inner-iterator(C++23) β public member function. - end β returns the default sentinel (C++23) β public member function.
- size β returns the size of the view (C++23) β public member function.
π Inherited from std::ranges::view_interface π
- empty β returns whether the derived view is empty. Provided if it satisfies
sized_rangeorforward_range. (C++20) β public member function ofstd::ranges::view_interface<D>. - cbegin β returns a constant iterator to the beginning of the range. (C++23) β public member function of
std::ranges::view_interface<D>. - cend β returns a sentinel for the constant iterator of the range. (C++23) β public member function of
std::ranges::view_interface<D>. operator boolβ returns whether the derived view is not empty. Provided ifranges::emptyis applicable to it. (C++20) β public member function ofstd::ranges::view_interface<D>.
π§Έ std::ranges::chunk_view::outer-iterator::value_type::value_type
private:
// exposition only (since C++23)
constexpr explicit value_type( chunk_view& parent );
Constructs the value_type object so that parent_ is initialized with std::addressof(parent).
Parameters
- parent β the
chunk_viewobject.
π¦ std::ranges::chunk_view::outer-iterator::value_type::begin
constexpr /*inner-iterator*/ begin() const noexcept; (since C++23)
Equivalent to return /*inner-iterator*/(*parent_);.
π std::ranges::chunk_view::outer-iterator::value_type::end
constexpr std::default_sentinel_t end() const noexcept; (since C++23)
Equivalent to return std::default_sentinel;.
π std::ranges::chunk_view::outer-iterator::value_type::size
constexpr auto size() const
requires std::sized_sentinel_for<ranges::sentinel_t<V>,
ranges::iterator_t<V>>;
(since C++23)
Returns the size of the view.
Equivalent to:
return /*to-unsigned-like*/(
ranges::min(parent_->remainder_, ranges::end(parent_->base_) -
*parent_->current_));
π§ͺ Example π§ͺ
This section is incomplete.
Reason: example
π References π
- C++23 standard (ISO/IEC 14882:2023):
- 26.7.28.4 Class chunk_view::outer-iterator::value_type [range.chunk.outer.value]
π See also π
outer_iteratorβ the output ("chunk-wise") iterator type whenVmodelsinput_range(C++23) β exposition-only member class ofstd::ranges::chunk_view<V>*.inner_iteratorβ the inner ("element-wise") iterator type whenVmodelsinput_range(C++23) β exposition-only member class ofstd::ranges::chunk_view<V>*.
ποΈ Category ποΈ
- Todo with reason
π source: http://cppreference.com Β· version/date: 2024.06.10 Β· page: std::ranges...::value_type(3)
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms