halcheck 1.0
Loading...
Searching...
No Matches
halcheck::lib::transform_view< V, F > Class Template Reference

A transforming iterator adaptor. More...

#include <transform.hpp>

Inheritance diagram for halcheck::lib::transform_view< V, F >:
halcheck::lib::view_interface< transform_view< V, F > >

Public Member Functions

constexpr transform_view ()=default
 Constructs a default transform_view.
 
constexpr transform_view (V base, F func)
 Constructs a transform_view from the given base range and function.
 
template<typename V2 , typename G >
constexpr transform_view (transform_view< V2, G > other)
 Performs a conversion on a transform_view with compatible type parameters.
 
template<typename V2 , typename G >
constexpr transform_view (transform_view< V2, G > other)
 Performs a conversion on a transform_view with compatible type parameters.
 
template<bool _ = true>
constexpr V base () const &
 Gets copy of the base range of this view.
 
base () &&
 Gets the base range of this view.
 
lib::transform_iterator< lib::iterator_t< V >, ref > begin ()
 Gets an iterator pointing to the beginning of this view.
 
template<typename U = V>
lib::transform_iterator< lib::iterator_t< const U >, ref > begin () const
 Gets an iterator pointing to the beginning of this view.
 
lib::transform_iterator< lib::iterator_t< V >, ref > end ()
 Gets an iterator pointing past the end of this view.
 
template<typename U = V>
lib::transform_iterator< lib::iterator_t< const U >, ref > end () const
 Gets an iterator pointing past the end of this view.
 
template<typename U = V>
lib::range_difference_t< U > size ()
 Computes the number of elements in this view.
 
template<typename U = V>
lib::range_difference_t< const U > size () const
 Computes the number of elements in this view.
 
constexpr bool empty () const
 
constexpr bool empty () const
 
bool empty ()
 
bool empty ()
 
constexpr operator bool () const
 
 operator bool ()
 
constexpr auto front () const -> decltype(*lib::begin(self< T >()))
 
auto front () -> decltype(*lib::begin(self< T >()))
 
constexpr auto back () const -> decltype(*std::prev(lib::end(self< T >())))
 
auto back () -> decltype(*std::prev(lib::end(self< T >())))
 
constexpr auto operator[] (lib::range_difference_t< T > n) const -> decltype(lib::begin(self< T >())[n])
 
auto operator[] (lib::range_difference_t< T > n) -> decltype(lib::begin(self< T >())[n])
 

Detailed Description

template<typename V, typename F>
class halcheck::lib::transform_view< V, F >

A transforming iterator adaptor.

Template Parameters
VThe base range type.
FThe type of function to apply to the values contained in a V.

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