Function prev

Synopsis

#include <include/type_safe/index.hpp>

constexpr index_t prev(const index_t &index, const difference_t &dist=difference_t(1))

Description

Returns
The [ts::index_t]() that is dist smaller than index. \notes This is the same as index - dist and the equivalent of [std::prev()](). \module types

Source

Lines 221-224 in include/type_safe/index.hpp.

constexpr index_t prev(const index_t& index, const difference_t& dist = difference_t(1))
{
    return index - dist;
}





Add Discussion as Guest

Log in