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

FreeBSD Manual Pages

  
 
  

home | help
std::experi...or_category(3)  C++ Standard Libary std::experi...or_category(3)

NAME
       std::experimental::ranges::iterator_category	 -     std::experimen-
       tal::ranges::iterator_category

Synopsis
	  Defined in header <experimental/ranges/iterator>
	  template< class I >						(1)
	  struct iterator_category { };
	  template< class T >						(2)
	  struct iterator_category<T*>;
	  template< class T >						(3)
	  struct iterator_category<const T> : iterator_category<T> { };
	  template <class T>

	  requires requires { typename T::iterator_category; }		(4)

	  struct iterator_category<T>;

	  Computes the iterator	category of the	class I,  if  any.  Users  may
       specialize
	  iterator_category for	a program-defined type.

	  1) Primary template is an empty struct.
	  2)  Specialization  for pointers. If T is an object type, provides a
       member type type
	  equal	to ranges::random_access_iterator_tag. Otherwise, there	is  no
       member type.
	  3) Specialization for	const-qualified	types.
	  4) Specialization for	types that define a public and accessible mem-
       ber type
	  iterator_category. If	T::iterator_category is	the same as or derived
       from one	of
	  iterator  category tags in namespace std, it is mapped to the	corre-
       sponding	tag in
	  the namespace	ranges as described below. Otherwise, provides a  mem-
       ber type	type
	  equal	to T::iterator_category.

	    * If T::iterator_category is the same as or	derives	from
	      std::random_access_iterator_tag,	provides  a  member  type type
       equal to
	      ranges::random_access_iterator_tag.
	    * Otherwise, if T::iterator_category is the	 same  as  or  derives
       from
	      std::bidirectional_iterator_tag,	provides  a  member  type type
       equal to
	      ranges::bidirectional_iterator_tag.
	    * Otherwise, if T::iterator_category is the	 same  as  or  derives
       from
	      std::forward_iterator_tag, provides a member type	type equal to
	      ranges::forward_iterator_tag.
	    *  Otherwise,  if  T::iterator_category  is	the same as or derives
       from
	      std::input_iterator_tag, provides	a member type type equal to
	      ranges::input_iterator_tag.
	    * Otherwise, if T::iterator_category is the	 same  as  or  derives
       from
	      std::output_iterator_tag,	there is no member type.

	 Helper	alias template

	  template< class T >
	  using		   iterator_category_t		  =	      typename
       (ranges TS)
	  ranges::iterator_category<T>::type;

Example
	   This	section	is incomplete
	   Reason: no example

See also
	  input_iterator_tag
	  output_iterator_tag
	  forward_iterator_tag	     empty class types used to indicate	itera-
       tor categories
	  bidirectional_iterator_tag (class)
	  random_access_iterator_tag
	  contiguous_iterator_tag
	  (C++20)
	  input_iterator_tag
	  output_iterator_tag	     empty class types used to indicate	itera-
       tor categories
	  forward_iterator_tag	     (class)
	  bidirectional_iterator_tag
	  random_access_iterator_tag
				     compatibility traits class	that  collects
       an iterators
	  iterator_traits	     associated	types
				     (alias template)

http://cppreference.com		  2022.07.31	  std::experi...or_category(3)

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

home | help