LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
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 96 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 99 of file get_elements.h.

References util::get_const_elements(), util::get_elements(), and util::make_transformed_span().

100  {
101  auto extractor = [](auto&& item) -> decltype(auto) {
102  if constexpr (sizeof...(Others) == 0U) { return util::get<First>(item); }
103  else {
104  return std::forward_as_tuple(util::get<First>(item), util::get<Others...>(item));
105  }
106  };
107  return util::make_transformed_span(coll, extractor);
108  }
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: