TRIQS/itertools 1.3.0
C++ range library
Loading...
Searching...
No Matches
itertools::zipped< Rs >

#include <itertools/zip.hpp>

Detailed Description

template<typename... Rs>
struct itertools::zipped< Rs >

Represents a zipped range.

See itertools::zip(Rs &&...rgs) for more details.

Template Parameters
RsRange types.

Definition at line 114 of file zip.hpp.

Public Types

using const_iterator = zip_iter<decltype(std::cbegin(std::declval<Rs &>()))...>
 Const iterator type of the zipped range.
 
using iterator = zip_iter<decltype(std::begin(std::declval<Rs &>()))...>
 Iterator type of the zipped range.
 
using seq_t = std::index_sequence_for<Rs...>
 Convenience typedef for an std::index_sequence.
 

Public Member Functions

template<typename... Us>
 zipped (Us &&...rgs)
 Construct a zipped range from the given ranges.
 
const_iterator begin () const noexcept
 Const overload of begin().
 
iterator begin () noexcept
 Beginning of the zipped range.
 
const_iterator cbegin () const noexcept
 Const version of begin().
 
auto cend () const noexcept
 Const version of end().
 
auto end () const noexcept
 Const overload of end().
 
auto end () noexcept
 End of the zipped range.
 
bool operator== (zipped const &) const =default
 Default equal-to operator.
 

Public Attributes

std::tuple< Rs... > tu
 Tuple containing the original ranges.
 

Constructor & Destructor Documentation

◆ zipped()

template<typename... Rs>
template<typename... Us>
itertools::zipped< Rs >::zipped ( Us &&... rgs)
inline

Construct a zipped range from the given ranges.

Template Parameters
UsRange types.
Parameters
rgsRanges to zip.

Definition at line 133 of file zip.hpp.

Member Function Documentation

◆ begin()

template<typename... Rs>
iterator itertools::zipped< Rs >::begin ( )
inlinenodiscardnoexcept

Beginning of the zipped range.

Returns
itertools::zip_iter constructed from the begin iterators of the original ranges.

Definition at line 154 of file zip.hpp.

◆ end()

template<typename... Rs>
auto itertools::zipped< Rs >::end ( )
inlinenodiscardnoexcept

End of the zipped range.

Returns
itertools::sentinel_t containing a tuple of end iterators of the original ranges.

Definition at line 170 of file zip.hpp.


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