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

#include <kblib/containers.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

template<typename... Args>
 build_iterator (Args &&... args)
 
constexpr auto base () noexcept(std::is_nothrow_move_constructible< Container >::value) -> Container
 
constexpr operator Container () noexcept(std::is_nothrow_move_constructible< Container >::value)
 
constexpr auto operator* () const noexcept(noexcept(*std::back_inserter(*range))) -> decltype(auto)
 Creates a temporary std::back_insert_iterator for the range and returns it. More...
 
constexpr auto operator++ () -> build_iterator &
 A no-op. More...
 
constexpr auto operator++ (int) -> build_iterator &
 A no-op. More...
 

Detailed Description

template<typename Container, bool ArrayLike = not is_resizable_v<Container>>
class kblib::build_iterator< Container, ArrayLike >

Definition at line 159 of file containers.h.

Member Typedef Documentation

◆ difference_type

template<typename Container , bool ArrayLike = not is_resizable_v<Container>>
using kblib::build_iterator< Container, ArrayLike >::difference_type = void

Definition at line 173 of file containers.h.

◆ iterator_category

template<typename Container , bool ArrayLike = not is_resizable_v<Container>>
using kblib::build_iterator< Container, ArrayLike >::iterator_category = std::output_iterator_tag

Definition at line 176 of file containers.h.

◆ pointer

template<typename Container , bool ArrayLike = not is_resizable_v<Container>>
using kblib::build_iterator< Container, ArrayLike >::pointer = void

Definition at line 174 of file containers.h.

◆ reference

template<typename Container , bool ArrayLike = not is_resizable_v<Container>>
using kblib::build_iterator< Container, ArrayLike >::reference = void

Definition at line 175 of file containers.h.

◆ value_type

template<typename Container , bool ArrayLike = not is_resizable_v<Container>>
using kblib::build_iterator< Container, ArrayLike >::value_type = void

Definition at line 172 of file containers.h.

Constructor & Destructor Documentation

◆ build_iterator()

template<typename Container , bool ArrayLike = not is_resizable_v<Container>>
template<typename... Args>
kblib::build_iterator< Container, ArrayLike >::build_iterator ( Args &&...  args)
inline

Definition at line 179 of file containers.h.

Member Function Documentation

◆ base()

template<typename Container , bool ArrayLike = not is_resizable_v<Container>>
constexpr auto kblib::build_iterator< Container, ArrayLike >::base ( ) -> Container
inlineconstexprnoexcept

Definition at line 182 of file containers.h.

◆ operator Container()

template<typename Container , bool ArrayLike = not is_resizable_v<Container>>
constexpr kblib::build_iterator< Container, ArrayLike >::operator Container ( )
inlineexplicitconstexprnoexcept

Definition at line 188 of file containers.h.

◆ operator*()

template<typename Container , bool ArrayLike = not is_resizable_v<Container>>
constexpr auto kblib::build_iterator< Container, ArrayLike >::operator* ( ) const -> decltype(auto)
inlineconstexprnoexcept

Creates a temporary std::back_insert_iterator for the range and returns it.

Returning an iterator from operator* might look strange, but std::back_insert_iterator can be assigned to to insert into the range, and its operator* returns itself anyhow.

Definition at line 202 of file containers.h.

◆ operator++() [1/2]

template<typename Container , bool ArrayLike = not is_resizable_v<Container>>
constexpr auto kblib::build_iterator< Container, ArrayLike >::operator++ ( ) -> build_iterator&
inlineconstexpr

A no-op.

Definition at line 210 of file containers.h.

◆ operator++() [2/2]

template<typename Container , bool ArrayLike = not is_resizable_v<Container>>
constexpr auto kblib::build_iterator< Container, ArrayLike >::operator++ ( int  ) -> build_iterator&
inlineconstexpr

A no-op.

Definition at line 216 of file containers.h.


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