Standard library header <experimental/ranges/range>

From cppreference.com
< cpp‎ | header‎ | experimental
 
 
Standard library headers
Language support
Concepts
<concepts> (C++20)
Diagnostics
<system_error> (C++11)

Memory management
<memory_resource> (C++17)  
Metaprogramming
<type_traits> (C++11)
<ratio> (C++11)
General utilities
<utility>
<tuple> (C++11)
<optional> (C++17)
<variant> (C++17)
<any> (C++17)
<expected> (C++23)
<bitset>

<charconv> (C++17)
<format> (C++20)
<bit> (C++20)

Strings
<cuchar> (C++11)

Containers
<flat_set> (C++23)
<span> (C++20)
<mdspan> (C++23)

Iterators
<iterator>
Ranges
<ranges> (C++20)
<generator> (C++23)
Algorithms
Numerics
<cfenv> (C++11)
<complex>
<numbers> (C++20)

Time
<chrono> (C++11)
Localization
<codecvt> (C++11/17*)
Input/output
<filesystem> (C++17)
<cstdio>
<cinttypes> (C++11)
<strstream> (C++98*)
Regular expressions
<regex> (C++11)
Concurrency support
<stop_token> (C++20)
<thread> (C++11)
<atomic> (C++11)
<stdatomic.h> (C++23)
<mutex> (C++11)
<shared_mutex> (C++14)
<condition_variable> (C++11)  
<semaphore> (C++20)
<latch> (C++20)
<barrier> (C++20)
<future> (C++11)

C compatibility
<cstdbool> (C++11/17/20*)  
<ccomplex> (C++11/17/20*)
<ctgmath> (C++11/17/20*)

<cstdalign> (C++11/17/20*)

<ciso646> (until C++20)

 

This header is part of the ranges library.

Range concepts

Defined in namespace std::experimental::ranges
specifies that a type is a range, that is, it provides a begin iterator and an end sentinel
(concept)
specifies that a range knows its size in constant time
(concept)
specifies that a range is a view, that is, it has constant time copy/move/assignment
(concept)
specifies that a range has identical iterator and sentinel types
(concept)
specifies a range whose iterator type satisfies InputIterator
(concept)
specifies a range whose iterator type satisfies OutputIterator
(concept)
specifies a range whose iterator type satisfies ForwardIterator
(concept)
specifies a range whose iterator type satisfies BidirectionalIterator
(concept)
specifies a range whose iterator type satisfies RandomAccessIterator
(concept)

Range access

Defined in namespace std::experimental::ranges
returns an iterator to the beginning of a range
(customization point object)
returns an iterator to the end of a range
(customization point object)
returns a reverse iterator to a range
(customization point object)
returns a reverse end iterator to a range
(customization point object)

Range primitives

Defined in namespace std::experimental::ranges
obtains the size of a range whose size can be calculated in constant time
(customization point object)
checks whether a range is empty
(customization point object)
obtains a pointer to the beginning of a contiguous range
(customization point object)
obtains the iterator and sentinel types of a range
(alias template)

Synopsis

#include <experimental/ranges/iterator>
 
namespace std { namespace experimental { namespace ranges { inline namespace v1 {
 
namespace {
  constexpr /* unspecified */ begin = /* unspecified */;
  constexpr /* unspecified */ end = /* unspecified */;
  constexpr /* unspecified */ cbegin = /* unspecified */;
  constexpr /* unspecified */ cend = /* unspecified */;
  constexpr /* unspecified */ rbegin = /* unspecified */;
  constexpr /* unspecified */ rend = /* unspecified */;
  constexpr /* unspecified */ crbegin = /* unspecified */;
  constexpr /* unspecified */ crend = /* unspecified */;
}
 
namespace {
  constexpr /* unspecified */ size = /* unspecified */;
  constexpr /* unspecified */ empty = /* unspecified */;
  constexpr /* unspecified */ data = /* unspecified */;
  constexpr /* unspecified */ cdata = /* unspecified */;
}
 
template <class T>
using iterator_t = decltype(ranges::begin(declval<T&>()));
 
template <class T>
using sentinel_t = decltype(ranges::end(declval<T&>()));
 
template <class>
constexpr bool disable_sized_range = false;
 
template <class T>
struct enable_view { };
 
struct view_base { };
 
template <class T>
concept bool Range = /* see definition */;
 
template <class T>
concept bool SizedRange = /* see definition */;
 
template <class T>
concept bool View = /* see definition */;
 
template <class T>
concept bool BoundedRange = /* see definition */;
 
template <class T>
concept bool InputRange = /* see definition */;
 
template <class R, class T>
concept bool OutputRange = /* see definition */;
 
template <class T>
concept bool ForwardRange = /* see definition */;
 
template <class T>
concept bool BidirectionalRange = /* see definition */;
 
template <class T>
concept bool RandomAccessRange = /* see definition */;
 
}}}}