VCCC  2024.05
VisualCamp Common C++ library
incrementable_traits< I > Struct Template Reference

#include </home/jarvis/actions-runner/jarvis-vccc-2/_work/vccc/vccc/include/vccc/__iterator/incrementable_traits.hpp>

+ Inheritance diagram for incrementable_traits< I >:

Detailed Description

template<typename I>
struct vccc::incrementable_traits< I >

Computes the associated difference type of the type I, if any. Users may specialize incrementable_traits for a program-defined type.

  1. Primary template is an empty struct.
  2. Specialization for pointers. Provides a member type difference_type equal to std::ptrdiff_t.
  3. Specialization for const-qualified types.
  4. Specialization for types that define a public and accessible member type difference_type. Provides a member type difference_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 difference_type equal to std::make_signed_t<decltype(std::declval<T>() - std::declval<T>())>.

See std::incrementable_traits for more details

Template Parameters
I

The documentation for this struct was generated from the following file: