Function advance

Synopsis

#include <include/type_safe/index.hpp>

void advance(index_t &index, const difference_t &dist)

Description

\effects Increments the [ts::index_t]() by the specified distance. If the distance is negative, decrements the index instead. \notes This is the same as index += dist and the equivalent of [std::advance()](). \module types

Source

Lines 196-199 in include/type_safe/index.hpp.

inline void advance(index_t& index, const difference_t& dist)
{
    index += dist;
}





Add Discussion as Guest

Log in