名稱空間
變體
操作

標準庫標頭檔案 <experimental/ranges/range>

來自 cppreference.com
 
 
標準庫標頭檔案
演算法
<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> (直到 C++20)
<cstdalign> (C++11/17/20*)
<cstdbool> (C++11/17/20*)
<ctgmath> (C++11/17/20*)
 

此標頭檔案是 ranges 庫的一部分。

目錄

[編輯] Range 概念

定義於名稱空間 std::experimental::ranges
指定型別為範圍,即它提供 begin 迭代器和 end 哨兵
(概念) [編輯]
指定範圍在常數時間內知道其大小
(概念) [編輯]
指定範圍是檢視,即它具有常數時間複製/移動/賦值
(概念) [編輯]
指定範圍具有相同的迭代器和哨兵型別
(概念) [編輯]
指定其迭代器型別滿足 InputIterator 的 Range
(概念) [編輯]
指定其迭代器型別滿足 OutputIterator 的 Range
(概念) [編輯]
指定其迭代器型別滿足 ForwardIterator 的 Range
(概念) [編輯]
指定其迭代器型別滿足 BidirectionalIterator 的 Range
(概念) [編輯]
指定其迭代器型別滿足 RandomAccessIterator 的 Range
(概念) [編輯]

[編輯] Range 訪問

定義於名稱空間 std::experimental::ranges
返回指向範圍開頭的迭代器
(定製點物件)[編輯]
返回指向 Range 末尾的迭代器
(定製點物件)[編輯]
返回指向範圍的反向迭代器
(定製點物件)[編輯]
返回指向範圍的反向結束迭代器
(定製點物件)[編輯]

[編輯] Range 原語

定義於名稱空間 std::experimental::ranges
獲取在常數時間內可計算大小的範圍的大小
(定製點物件)[編輯]
檢查範圍是否為空
(定製點物件)[編輯]
獲取指向連續範圍開頭的指標
(定製點物件)[編輯]
獲取 Range 的迭代器和哨兵型別
(別名模板)[編輯]

[編輯] 概要

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