GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
std::experimental::ranges::difference_type(3) C++ Standard Libary std::experimental::ranges::difference_type(3)

std::experimental::ranges::difference_type - std::experimental::ranges::difference_type


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;


This section is incomplete
Reason: no example


specifies that a Semiregular type can be incremented with pre-
WeaklyIncrementable and post-increment operators
(concept)
compatibility traits class that collects an iterator’s
iterator_traits associated types
(alias template)

2022.07.31 http://cppreference.com

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.