Static Public Member Functions | List of all members
util::details::get_elements_impl< Coll, First, Others > Struct Template Reference

#include <get_elements.h>

Static Public Member Functions

template<typename T >
static decltype(auto) constexpr iterate (T &&coll) noexcept
 

Detailed Description

template<typename Coll, std::size_t First, std::size_t... Others>
struct util::details::get_elements_impl< Coll, First, Others >

Definition at line 102 of file get_elements.h.

Member Function Documentation

template<typename Coll , std::size_t First, std::size_t... Others>
template<typename T >
static decltype(auto) constexpr util::details::get_elements_impl< Coll, First, Others >::iterate ( T &&  coll)
inlinestaticnoexcept

Definition at line 105 of file get_elements.h.

106  {
107  auto extractor = [](auto&& item) -> decltype(auto)
108  {
109  if constexpr(sizeof...(Others) == 0U) {
110  return util::get<First>(item);
111  }
112  else {
113  return std::forward_as_tuple
114  (util::get<First>(item), util::get<Others...>(item));
115  }
116  };
117  return util::make_transformed_span(coll, extractor);
118  }
auto make_transformed_span(BIter begin, EIter end, Op &&op)
Definition: span.h:294

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