LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
util::details::RangeForWrapperTraits< RangeRef > Struct Template Reference

Class defining types and traits for RangeForWrapperBox. More...

#include "RangeForWrapper.h"

Public Types

using RangeRef_t = RangeRef
 Type of the stored range (constantness is preserved). More...
 
using Range_t = std::remove_reference_t< RangeRef_t >
 
using BeginIter_t = decltype(extractBegin(std::declval< RangeRef_t >()))
 Type of wrapped begin iterator. More...
 
using EndIter_t = decltype(extractEnd(std::declval< RangeRef_t >()))
 Type of wrapped end iterator. More...
 
using Iterator_t = RangeForWrapperIterator< BeginIter_t, EndIter_t >
 Type of wrapper iterators (same for begin and end iterators). More...
 
using value_type = typename BeginIter_t::value_type
 
using size_type = std::size_t
 
using difference_type = typename BeginIter_t::difference_type
 
using reference = typename BeginIter_t::value_type
 
using pointer = typename BeginIter_t::pointer
 

Static Public Member Functions

static auto extractBegin (RangeRef_t range)
 Extractor of the begin iterator from a range. More...
 
static auto extractEnd (RangeRef_t range)
 Extracts the end iterator from a range object. More...
 

Static Public Attributes

static constexpr bool sameIteratorTypes = std::is_same<BeginIter_t, EndIter_t>()
 True if the range has iterators of the same type. More...
 

Detailed Description

template<typename RangeRef>
struct util::details::RangeForWrapperTraits< RangeRef >

Class defining types and traits for RangeForWrapperBox.

Definition at line 250 of file RangeForWrapper.h.

Member Typedef Documentation

template<typename RangeRef >
using util::details::RangeForWrapperTraits< RangeRef >::BeginIter_t = decltype(extractBegin(std::declval<RangeRef_t>()))

Type of wrapped begin iterator.

Definition at line 275 of file RangeForWrapper.h.

template<typename RangeRef >
using util::details::RangeForWrapperTraits< RangeRef >::difference_type = typename BeginIter_t::difference_type

Definition at line 288 of file RangeForWrapper.h.

template<typename RangeRef >
using util::details::RangeForWrapperTraits< RangeRef >::EndIter_t = decltype(extractEnd(std::declval<RangeRef_t>()))

Type of wrapped end iterator.

Definition at line 278 of file RangeForWrapper.h.

Type of wrapper iterators (same for begin and end iterators).

Definition at line 284 of file RangeForWrapper.h.

template<typename RangeRef >
using util::details::RangeForWrapperTraits< RangeRef >::pointer = typename BeginIter_t::pointer

Definition at line 290 of file RangeForWrapper.h.

template<typename RangeRef >
using util::details::RangeForWrapperTraits< RangeRef >::Range_t = std::remove_reference_t<RangeRef_t>

Definition at line 258 of file RangeForWrapper.h.

template<typename RangeRef >
using util::details::RangeForWrapperTraits< RangeRef >::RangeRef_t = RangeRef

Type of the stored range (constantness is preserved).

Definition at line 257 of file RangeForWrapper.h.

template<typename RangeRef >
using util::details::RangeForWrapperTraits< RangeRef >::reference = typename BeginIter_t::value_type

Definition at line 289 of file RangeForWrapper.h.

template<typename RangeRef >
using util::details::RangeForWrapperTraits< RangeRef >::size_type = std::size_t

Definition at line 287 of file RangeForWrapper.h.

template<typename RangeRef >
using util::details::RangeForWrapperTraits< RangeRef >::value_type = typename BeginIter_t::value_type

Definition at line 286 of file RangeForWrapper.h.

Member Function Documentation

template<typename RangeRef >
static auto util::details::RangeForWrapperTraits< RangeRef >::extractBegin ( RangeRef_t  range)
inlinestatic

Extractor of the begin iterator from a range.

Definition at line 261 of file RangeForWrapper.h.

References util::begin().

262  {
263  using namespace std;
264  return begin(range);
265  }
STL namespace.
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Definition: StdUtils.h:69
template<typename RangeRef >
static auto util::details::RangeForWrapperTraits< RangeRef >::extractEnd ( RangeRef_t  range)
inlinestatic

Extracts the end iterator from a range object.

Definition at line 268 of file RangeForWrapper.h.

References util::end().

269  {
270  using namespace std;
271  return end(range);
272  }
STL namespace.
decltype(auto) constexpr end(T &&obj)
ADL-aware version of std::end.
Definition: StdUtils.h:77

Member Data Documentation

template<typename RangeRef >
constexpr bool util::details::RangeForWrapperTraits< RangeRef >::sameIteratorTypes = std::is_same<BeginIter_t, EndIter_t>()
static

True if the range has iterators of the same type.

Definition at line 281 of file RangeForWrapper.h.


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