Public Types | Static Public Member Functions | Static Public Attributes | List of all members
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 231 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 247 of file RangeForWrapper.h.

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

Definition at line 261 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 250 of file RangeForWrapper.h.

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

Definition at line 257 of file RangeForWrapper.h.

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

Definition at line 263 of file RangeForWrapper.h.

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

Definition at line 236 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 235 of file RangeForWrapper.h.

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

Definition at line 262 of file RangeForWrapper.h.

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

Definition at line 260 of file RangeForWrapper.h.

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

Definition at line 259 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 239 of file RangeForWrapper.h.

240  { using namespace std; return begin(range); }
STL namespace.
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Definition: StdUtils.h:72
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 243 of file RangeForWrapper.h.

244  { using namespace std; return end(range); }
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 254 of file RangeForWrapper.h.


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