kblib 0.2.3
General utilities library for modern C++
kblib::back_insert_iterator_F< Container, F > Class Template Reference

An OutputIterator that transforms the values assigned to it before inserting them into the back of a container. More...

#include <kblib/iterators.h>

Public Types

using value_type = void
 
using difference_type = void
 
using pointer = void
 
using reference = void
 
using iterator_category = std::output_iterator_tag
 

Public Member Functions

 back_insert_iterator_F (Container &c, F f)
 
template<typename V >
auto operator= (V &&value) -> back_insert_iterator_F &
 Calls container.push_back(kblib::invoke(fun, std::forward<V>(value)));. More...
 
auto operator* () -> back_insert_iterator_F &
 A no-op. More...
 
auto operator++ () -> back_insert_iterator_F &
 A no-op. More...
 

Detailed Description

template<typename Container, typename F>
class kblib::back_insert_iterator_F< Container, F >

An OutputIterator that transforms the values assigned to it before inserting them into the back of a container.

Author
From marttyfication#4235 on the C++ Help discord.

Definition at line 1500 of file iterators.h.

Member Typedef Documentation

◆ difference_type

template<typename Container , typename F >
using kblib::back_insert_iterator_F< Container, F >::difference_type = void

Definition at line 1513 of file iterators.h.

◆ iterator_category

template<typename Container , typename F >
using kblib::back_insert_iterator_F< Container, F >::iterator_category = std::output_iterator_tag

Definition at line 1516 of file iterators.h.

◆ pointer

template<typename Container , typename F >
using kblib::back_insert_iterator_F< Container, F >::pointer = void

Definition at line 1514 of file iterators.h.

◆ reference

template<typename Container , typename F >
using kblib::back_insert_iterator_F< Container, F >::reference = void

Definition at line 1515 of file iterators.h.

◆ value_type

template<typename Container , typename F >
using kblib::back_insert_iterator_F< Container, F >::value_type = void

Definition at line 1512 of file iterators.h.

Constructor & Destructor Documentation

◆ back_insert_iterator_F()

template<typename Container , typename F >
kblib::back_insert_iterator_F< Container, F >::back_insert_iterator_F ( Container &  c,
f 
)
inlineexplicit
Parameters
cThe container to be inserted into.
fThe tranformation to apply to each argument.

Definition at line 1508 of file iterators.h.

Member Function Documentation

◆ operator*()

template<typename Container , typename F >
auto kblib::back_insert_iterator_F< Container, F >::operator* ( ) -> back_insert_iterator_F&
inline

A no-op.

Definition at line 1534 of file iterators.h.

◆ operator++()

template<typename Container , typename F >
auto kblib::back_insert_iterator_F< Container, F >::operator++ ( ) -> back_insert_iterator_F&
inline

A no-op.

Definition at line 1538 of file iterators.h.

◆ operator=()

template<typename Container , typename F >
template<typename V >
auto kblib::back_insert_iterator_F< Container, F >::operator= ( V &&  value) -> back_insert_iterator_F&
inline

Calls container.push_back(kblib::invoke(fun, std::forward<V>(value)));.

Parameters
valueThe value to transform and insert.
Returns
back_insert_iterator& *this.

Definition at line 1526 of file iterators.h.


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