Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
std::ranges...k_view::end(3)  C++ Standard Libary std::ranges...k_view::end(3)

NAME
       std::ranges::chunk_view::end - std::ranges::chunk_view::end

Synopsis
	  V models only	input_range
	  constexpr	std::default_sentinel_t	   end()    const    noexcept;
       (1) (since C++23)
	  V models forward_range
	  constexpr	auto	 end()	    requires	  (!__simple_view<V>);
       (2) (since C++23)
	  constexpr  auto  end()  const	 requires  ranges::forward_range<const
       (3) (since C++23)
	  V>;

	  Returns an iterator or a std::default_sentinel that  compares	 equal
       to the end
	  iterator of the chunk_view.

	  1) Available only if V models	input_range. Equivalent	to: return
	  std::default_sentinel.
	  2,3)	Available  if V	models forward_range. Let base_	denote the un-
       derlying	adapted
	  view,	n_ denote the stored  chunk  size,  and	 iterator  denote  the
       nested iterator
	  class.
	  2) Equivalent	to:

	if constexpr (ranges::common_range<V> && ranges::sized_range<V>)
	{
	    auto missing = (n_ - ranges::distance(base_) % n_) % n_;
	    return iterator<false>(this, ranges::end(base_), missing);
	}
	else   if   constexpr  (ranges::common_range<V>	 &&  !ranges::bidirec-
       tional_range<V>)
	    return iterator<false>(this, ranges::end(base_));
	else
	    return std::default_sentinel;

	  3) Equivalent	to:

	if	 constexpr	 (ranges::common_range<const	   V>	    &&
       ranges::sized_range<const V>)
	{
	    auto missing = (n_ - ranges::distance(base_) % n_) % n_;
	    return iterator<true>(this,	ranges::end(base_), missing);
	}
	else  if constexpr (ranges::common_range<const V> && !ranges::bidirec-
       tional_range<const V>)
	    return iterator<true>(this,	ranges::end(base_));
	else
	    return std::default_sentinel;

Parameters
	  (none)

Return value
	  An iterator or sentinel representing the end of the  chunk_view,  as
       described above.

Example
	   This	section	is incomplete
	   Reason: no example

See also
	  begin	      returns an iterator to the beginning
	  (C++23)     (public member function)
	  ranges::end returns a	sentinel indicating the	end of a range
	  (C++20)     (customization point object)

Category:
	    * Todo no example

http://cppreference.com		  2024.06.10	  std::ranges...k_view::end(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=std::ranges::chunk_view::end&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help