Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
arene::base::is_weakly_incrementable< Itr > Class Template Reference

A trait which validates if an iterator models pre/post-increment operations without requiring equality preservation. More...

Inheritance diagram for arene::base::is_weakly_incrementable< Itr >:
Inheritance graph

Detailed Description

template<typename Itr>
class arene::base::is_weakly_incrementable< Itr >

A trait which validates if an iterator models pre/post-increment operations without requiring equality preservation.

Template Parameters
ItrThe type of the iterator to be checked.

An iterator models the weakly incrementable concept if all of the following are true:

  1. The iterator is movable.
  2. The iterator supports pre-increment (++itr) returning a reference to itself.
  3. The iterator supports post-increment (itr++).
  4. The iterator has a valid difference type (iter_difference_t<Itr>) and it is a signed integral type.
Note
Condition 4 is a strengthening compared to std::is_weakly_incrementable , which requires a valid difference type which is only a signed integer like type. Implementing the integer-like requirement is extremely difficult in C++14, so the stricter std::is_signed and std::is_integral traits are used instead.

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