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

FreeBSD Manual Pages

  
 
  

home | help
std::ranges...brange::size(3) C++ Standard Libarystd::ranges...brange::size(3)

NAME
       std::ranges::subrange::size - std::ranges::subrange::size

Synopsis
	  constexpr /* see below */ size() const	     (since C++20)
	      requires (K == ranges::subrange_kind::sized);

	  Obtains the number of	elements in the	subrange.

	  The	return	 type	is   the  corresponding	 unsigned  version  of
       std::iter_difference_t<I>.

Parameters
	  (none)

Return value
	  s_ - i_ explicitly converted to the return type, where i_ and	s_ are
       the stored
	  iterator and sentinel	respectively, if the size is not stored.

	  Otherwise, the stored	size.

Notes
	  The size is stored into a subrange if	and only if K ==  ranges::sub-
       range_kind::sized
	  but std::sized_sentinel_for<S, I> is not satisfied.

Example
	   This	section	is incomplete
	   Reason: no example

See also
	  empty	       checks whether the subrange is empty
	  (C++20)      (public member function)
	  size
	  ssize	       returns the size	of a container or array
	  (C++17)      (function template)
	  (C++20)
	  ranges::size returns an integer equal	to the size of a range
	  (C++20)      (customization point object)

Category:
	    * Todo no example

http://cppreference.com		  2024.06.10	 std::ranges...brange::size(3)

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

home | help