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

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

#include <kblib/iterators.h>

Public Member Functions

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

Friends

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

Detailed Description

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

Definition at line 563 of file iterators.h.

Constructor & Destructor Documentation

◆ incrementer() [1/2]

constexpr kblib::incrementer::incrementer ( )
constexprdefaultnoexcept

◆ incrementer() [2/2]

constexpr kblib::incrementer::incrementer ( int  )
inlineconstexprnoexcept

Definition at line 565 of file iterators.h.

Member Function Documentation

◆ operator int()

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

Definition at line 566 of file iterators.h.

◆ operator()()

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

Definition at line 572 of file iterators.h.

Friends And Related Function Documentation

◆ operator*

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

Definition at line 567 of file iterators.h.


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