std::experimental::ranges::difference_type (3) - Linux Manuals
std::experimental::ranges::difference_type: std::experimental::ranges::difference_type
Command to display std::experimental::ranges::difference_type
manual in Linux: $ man 3 std::experimental::ranges::difference_type
NAME
std::experimental::ranges::difference_type - std::experimental::ranges::difference_type
Synopsis
Defined in header <experimental/ranges/iterator>
template< class I > (1)
struct difference_type { };
template< class T > (2)
struct difference_type<T*>;
template< class T > (3)
struct difference_type<const T> : difference_type<std::decay_t<T>> { };
template <class T>
requires requires { typename T::difference_type; } (4)
struct difference_type<T>;
template <class T>
requires !requires { typename T::difference_type; } && (5)
requires(const T& a, const T& b) { { a - b } -> Integral; }
struct difference_type<T>;
Computes the associated difference type of the type I, if any. Users may specialize difference_type for a program-defined type.
1) Primary template is an empty struct.
2) Specialization for pointers. If T is an object type, provides a member type type equal to std::ptrdiff_t. Otherwise, there is no member type.
3) Specialization for const-qualified types.
4) Specialization for types that define a public and accessible member type difference_type. Provides a member type type equal to T::difference_type.
5) Specialization for types that do not define a public and accessible member type difference_type but do support subtraction. Provides a member type type equal to std::make_signed_t<decltype(std::declval<T>() - std::declval<T>())>.
Helper alias template
template< class T > (ranges TS)
using difference_type_t = typename ranges::difference_type<T>::type;
Example
This section is incomplete
Reason: no example
See also
specifies that a Semiregular type can be incremented with pre- and post-increment operators
WeaklyIncrementable (concept)
compatibility traits class that collects an iterator’s associated types
iterator_traits (alias template)
Pages related to std::experimental::ranges::difference_type
- std::experimental::ranges::distance (3) - std::experimental::ranges::distance
- std::experimental::ranges::dangling,std::experimental::ranges::safe_iterator_t (3) - std::experimental::ranges::dangling,std::experimental::ranges::safe_iterator_t
- std::experimental::ranges::Assignable (3) - std::experimental::ranges::Assignable
- std::experimental::ranges::BidirectionalIterator (3) - std::experimental::ranges::BidirectionalIterator
- std::experimental::ranges::BidirectionalRange (3) - std::experimental::ranges::BidirectionalRange
- std::experimental::ranges::Boolean (3) - std::experimental::ranges::Boolean
- std::experimental::ranges::BoundedRange (3) - std::experimental::ranges::BoundedRange
- std::experimental::ranges::Common (3) - std::experimental::ranges::Common
- std::experimental::ranges::CommonReference (3) - std::experimental::ranges::CommonReference
- std::experimental::ranges::Constructible (3) - std::experimental::ranges::Constructible
- std::experimental::ranges::ConvertibleTo (3) - std::experimental::ranges::ConvertibleTo
- std::experimental::ranges::CopyConstructible (3) - std::experimental::ranges::CopyConstructible
- std::experimental::ranges::Copyable (3) - std::experimental::ranges::Copyable
- std::experimental::ranges::DefaultConstructible (3) - std::experimental::ranges::DefaultConstructible
- std::experimental::ranges::DerivedFrom (3) - std::experimental::ranges::DerivedFrom
- std::experimental::ranges::Destructible (3) - std::experimental::ranges::Destructible
- std::experimental::ranges::EqualityComparable, (3) - std::experimental::ranges::EqualityComparable,
- std::experimental::ranges::EqualityComparable,std::experimental::ranges::EqualityComparableWith (3) - std::experimental::ranges::EqualityComparable,std::experimental::ranges::EqualityComparableWith
- std::experimental::ranges::ForwardIterator (3) - std::experimental::ranges::ForwardIterator
- std::experimental::ranges::ForwardRange (3) - std::experimental::ranges::ForwardRange
- std::experimental::ranges::Incrementable (3) - std::experimental::ranges::Incrementable
- std::experimental::ranges::IndirectRelation (3) - std::experimental::ranges::IndirectRelation
- std::experimental::ranges::IndirectStrictWeakOrder (3) - std::experimental::ranges::IndirectStrictWeakOrder
- std::experimental::ranges::IndirectUnaryInvocable, (3) - std::experimental::ranges::IndirectUnaryInvocable,
- std::experimental::ranges::IndirectUnaryInvocable,std::experimental::ranges::IndirectRegularUnaryInvocable (3) - std::experimental::ranges::IndirectUnaryInvocable,std::experimental::ranges::IndirectRegularUnaryInvocable
- std::experimental::ranges::IndirectUnaryPredicate (3) - std::experimental::ranges::IndirectUnaryPredicate
- std::experimental::ranges::IndirectlyComparable (3) - std::experimental::ranges::IndirectlyComparable
- std::experimental::ranges::IndirectlyCopyable (3) - std::experimental::ranges::IndirectlyCopyable
- std::experimental::ranges::IndirectlyCopyableStorable (3) - std::experimental::ranges::IndirectlyCopyableStorable
- std::experimental::ranges::IndirectlyMovable (3) - std::experimental::ranges::IndirectlyMovable
- std::experimental::ranges::IndirectlyMovableStorable (3) - std::experimental::ranges::IndirectlyMovableStorable