std::experimental::ranges:: difference_type
|
ヘッダーで定義
<experimental/ranges/iterator>
|
||
|
template
<
class
I
>
struct difference_type { } ; |
(1) | |
|
template
<
class
T
>
struct difference_type < T * > ; |
(2) | |
|
template
<
class
T
>
struct difference_type < const T > : difference_type < std:: decay_t < T >> { } ; |
(3) | |
|
template
<
class
T
>
requires requires
{
typename
T
::
difference_type
;
}
|
(4) | |
|
template
<
class
T
>
requires
!
requires
{
typename
T
::
difference_type
;
}
&&
|
(5) | |
型
I
に関連付けられた差型を計算します(存在する場合)。ユーザーはプログラム定義型に対して
difference_type
を特殊化できます。
difference_type
を定義する型に対する特殊化。
メンバ型
type
を
T::difference_type
と等しいものとして提供します。
difference_type
を定義していないが、減算をサポートする型に対する特殊化。
メンバ型
type
を
std::
make_signed_t
<
decltype
(
std::
declval
<
T
>
(
)
-
std::
declval
<
T
>
(
)
)
>
と等しく定義する。
ヘルパーエイリアステンプレート
|
template
<
class
T
>
using difference_type_t = typename ranges :: difference_type < T > :: type ; |
(範囲 TS) | |
例
|
このセクションは不完全です
理由: 例がありません |
関連項目
Semiregular
型が前置および後置インクリメント演算子でインクリメント可能であることを指定する
(コンセプト) |
|
|
イテレータの関連型を収集する互換性トレイトクラス
(エイリアステンプレート) |