命名空间
变体
操作

标准库头文件 <experimental/ranges/range>

来自 cppreference.cn
< cpp‎ | header‎ | experimental
 
 
标准库头文件
算法
<algorithm>
<numeric>
字符串
<cctype>
<cstring>
<cuchar> (C++11)
<cwchar>
<cwctype>
<string_view> (C++17)
<string>
文本处理
<clocale>
<codecvt> (C++11/17/26*)
<locale>
<regex> (C++11)
<text_encoding> (C++26)   
数值
<cfenv> (C++11)
<cmath>
<complex>
<linalg> (C++26)
<numbers> (C++20)
<random> (C++11)
<simd> (C++26)
<valarray>
时间
<chrono> (C++11)
<ctime>
C 兼容性
<ccomplex> (C++11/17/20*)
<ciso646> (until C++20)
<cstdalign> (C++11/17/20*)
<cstdbool> (C++11/17/20*)
<ctgmath> (C++11/17/20*)
 

此头文件是 ranges 库的一部分。

目录

[编辑] 范围概念

定义于命名空间 std::experimental::ranges
指定一个类型为范围,即它提供一个 begin 迭代器和一个 end 哨位
(概念) [编辑]
指定一个范围在常数时间内知道其大小
(概念) [编辑]
View
指定一个范围是视图,即它具有常数时间的复制/移动/赋值
指定一个范围具有相同的迭代器和哨位类型
(概念) [编辑]
指定一个范围,其迭代器类型满足 InputIterator
(概念) [编辑]
指定一个范围,其迭代器类型满足 OutputIterator
(概念) [编辑]
指定一个范围,其迭代器类型满足 ForwardIterator
(概念) [编辑]
指定一个范围,其迭代器类型满足 BidirectionalIterator
(概念) [编辑]
指定一个范围,其迭代器类型满足 RandomAccessIterator
(概念) [编辑]

[编辑] 范围访问

定义于命名空间 std::experimental::ranges
返回指向范围开始的迭代器
(定制点对象)[编辑]
返回指向范围结束的迭代器
(定制点对象)[编辑]
返回指向范围的反向迭代器
(定制点对象)[编辑]
返回指向范围反向结束的迭代器
(定制点对象)[编辑]

[编辑] 范围原语

定义于命名空间 std::experimental::ranges
获取可以在常数时间内计算大小的范围的大小
(定制点对象)[编辑]
检查范围是否为空
(定制点对象)[编辑]
获取指向连续范围开始的指针
(定制点对象)[编辑]
获取范围的迭代器和哨位类型
(别名模板)[编辑]

[编辑] 概要

#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 */;
 
}}}}