Classes | Namespaces | Typedefs | Functions
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:

Deprecated:
Boost offers boost::make_indirect_iterator and similar, with header boost/iterator/indirect_iterator.hpp.

Definition in file DereferenceIterator.h.