LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
DereferenceIterator.h File Reference

Offer iterators automatically dereferencing their values. More...

#include <utility>
#include <type_traits>

Go to the source code of this file.

Classes

class  lar::util::detail::IteratorBox< BeginIter, EndIter >
 
class  lar::util::detail::DereferenceIteratorBase< Iter, Value >
 Base class for dereferencing iterators. More...
 
struct  lar::util::detail::DereferenceIteratorBase< Iter, Value >::initialize_tag
 Tag used for initialization. More...
 

Namespaces

 lar
 LArSoft-specific namespace.
 
 lar::util
 LArSoft utility namespace.
 
 lar::util::detail
 

Typedefs

template<typename Iter >
using lar::util::DereferenceConstIterator = detail::DereferenceIteratorBase< Iter, std::add_const_t< std::decay_t< decltype(**(std::declval< Iter >()))>> >
 An iterator wrapper to dereference pointed values. More...
 
template<typename Iter >
using lar::util::DereferenceIterator = detail::DereferenceIteratorBase< Iter, std::decay_t< decltype(**(std::declval< Iter >()))> >
 An iterator wrapper to dereferencing pointed values as constant. More...
 

Functions

template<typename BeginIter , typename EndIter >
auto lar::util::detail::makeIteratorBox (BeginIter b, EndIter e)
 
template<typename Iter , typename Value >
auto lar::util::detail::operator+ (typename DereferenceIteratorBase< Iter, Value >::difference_type offset, DereferenceIteratorBase< Iter, Value > const &iter)
 Swapped addition operator. More...
 
template<typename Iter >
auto lar::util::makeDereferenceIterator (Iter &&iter)
 Returns a dereference iterator to the begin of specified container. More...
 
template<typename Cont >
auto lar::util::beginDereferenceIterator (Cont &cont)
 Returns a dereference iterator to the begin of specified container. More...
 
template<typename Cont >
auto lar::util::endDereferenceIterator (Cont &cont)
 Returns a dereference iterator to the end of specified container. More...
 
template<typename Cont >
auto lar::util::rbeginDereferenceIterator (Cont &cont)
 Returns a dereference reverse iterator to the begin of container. More...
 
template<typename Cont >
auto lar::util::rendDereferenceIterator (Cont &cont)
 Returns a dereference reverse iterator to the end of container. More...
 
template<typename Cont >
auto lar::util::dereferenceIteratorLoop (Cont &cont)
 Returns an object enabling a dereferencing range-for loop. More...
 
template<typename Cont >
auto lar::util::dereferenceIteratorReverseLoop (Cont &cont)
 Returns an object enabling a dereferencing reverse range-for loop. More...
 
Constant iterator functions

See the documentation of the similar non-const ones.

template<typename Iter >
auto lar::util::makeDereferenceConstIterator (Iter &&iter)
 
template<typename Cont >
auto lar::util::cbeginDereferenceIterator (Cont &cont)
 
template<typename Cont >
auto lar::util::cendDereferenceIterator (Cont &cont)
 
template<typename Cont >
auto lar::util::crbeginDereferenceIterator (Cont &cont)
 
template<typename Cont >
auto lar::util::crendDereferenceIterator (Cont &cont)
 
template<typename Cont >
auto lar::util::dereferenceConstIteratorLoop (Cont &cont)
 Returns an object enabling a dereferencing range-for loop. More...
 
template<typename Cont >
auto lar::util::dereferenceConstIteratorReverseLoop (Cont &cont)
 Returns an object enabling a dereferencing reverse range-for loop. More...
 

Detailed Description

Offer iterators automatically dereferencing their values.

Author
Gianluca Petrillo (petri.nosp@m.llo@.nosp@m.fnal..nosp@m.gov)
Date
November 18, 2016

This is a header only template library.

It offers:

Definition in file DereferenceIterator.h.