kblib 0.2.3
General utilities library for modern C++
kblib::decrementer Struct Reference

A struct which decrements anything it is added to. Suitable for use as a Delta type for range_t. More...

#include <kblib/iterators.h>

Public Member Functions

constexpr decrementer () noexcept=default
 
constexpr decrementer (int) noexcept
 
constexpr operator int () const noexcept
 
template<typename T >
constexpr auto operator() (T &t) -> T &
 

Friends

constexpr auto operator* (std::ptrdiff_t x, decrementer)
 

Detailed Description

A struct which decrements anything it is added to. Suitable for use as a Delta type for range_t.

Definition at line 589 of file iterators.h.

Constructor & Destructor Documentation

◆ decrementer() [1/2]

constexpr kblib::decrementer::decrementer ( )
constexprdefaultnoexcept

◆ decrementer() [2/2]

constexpr kblib::decrementer::decrementer ( int  )
inlineconstexprnoexcept

Definition at line 591 of file iterators.h.

Member Function Documentation

◆ operator int()

constexpr kblib::decrementer::operator int ( ) const
inlineconstexprnoexcept

Definition at line 592 of file iterators.h.

◆ operator()()

template<typename T >
constexpr auto kblib::decrementer::operator() ( T &  t) -> T&
inlineconstexpr

Definition at line 597 of file iterators.h.

Friends And Related Function Documentation

◆ operator*

constexpr auto operator* ( std::ptrdiff_t  x,
decrementer   
)
friend

Definition at line 593 of file iterators.h.


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