標準ライブラリヘッダ <experimental/ranges/range>
From cppreference.com
< cpp | header | experimental
このヘッダーは、ranges ライブラリの一部です。
目次 |
[編集] Range コンセプト
std::experimental::ranges 名前空間で定義されます。 | |
型がrangeであること、すなわち begin イテレータと end 番兵を提供することを規定する(concept) | |
| rangeが定数時間でそのサイズを知っていることを規定する (concept) | |
| rangeがviewであること、すなわち定数時間でのコピー/ムーブ/代入を持つことを規定する (concept) | |
| rangeが同一のイテレータ型と番兵型を持つことを規定する (concept) | |
InputIterator を満たすイテレータ型を持つ Range を指定します。(concept) | |
OutputIterator を満たすイテレータ型を持つ Range を指定します。(concept) | |
ForwardIterator を満たすイテレータ型を持つ Range を指定します。(concept) | |
BidirectionalIterator を満たすイテレータ型を持つ Range を指定します。(concept) | |
RandomAccessIterator を満たすイテレータ型を持つ Range を指定します。(concept) | |
[編集] Range アクセス
std::experimental::ranges 名前空間で定義されます。 | |
| rangeの先頭を指すイテレータを返す (customization point object) | |
| Range の終端へのイテレータを返します。 (customization point object) | |
| rangeへの逆イテレータを返す (customization point object) | |
| rangeへの逆終端イテレータを返す (customization point object) | |
[編集] Range プリミティブ
std::experimental::ranges 名前空間で定義されます。 | |
| 定数時間で計算可能なサイズを持つ範囲のサイズを取得します。 (customization point object) | |
| rangeが空かどうかをチェックする (customization point object) | |
| 連続rangeの先頭へのポインタを取得する (customization point object) | |
| Range のイテレータ型とセンチネル型を取得します。 (alias template) | |
[編集] シノプシス
#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 */; }}}}