LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
lar::dump::details Namespace Reference

Functions

template<typename Coll >
auto ptr_cbegin (Coll const &v)
 
template<typename T >
std::add_const_t< T > * ptr_cbegin (T *ptr)
 
template<typename Stream , typename Array >
void dumpArray (Stream &&out, Array &&a, size_t n)
 Inserts n of elements of a in the specified stream. More...
 

Function Documentation

template<typename Stream , typename Array >
void lar::dump::details::dumpArray ( Stream &&  out,
Array &&  a,
size_t  n 
)

Inserts n of elements of a in the specified stream.

Definition at line 37 of file DumpUtils.h.

References ptr_cbegin().

Referenced by lar::dump::ArrayDumper< T const * >::operator()(), and lar::dump::ArrayDumper< T * >::operator()().

37  {
38  out << "{";
39  if (n == 0) { out << "}"; return; }
40  auto it = ptr_cbegin(a);
41  out << " " << *it;
42  std::size_t i = 0;
43  while (++i < n) out << "; " << (*++it);
44  out << " }";
45  } // dumpArray()
std::add_const_t< T > * ptr_cbegin(T *ptr)
Definition: DumpUtils.h:32
Char_t n[5]
template<typename Coll >
auto lar::dump::details::ptr_cbegin ( Coll const &  v)

Definition at line 29 of file DumpUtils.h.

Referenced by dumpArray().

29 { using std::cbegin; return cbegin(v); }
template<typename T >
std::add_const_t<T>* lar::dump::details::ptr_cbegin ( T *  ptr)

Definition at line 32 of file DumpUtils.h.

32 { return ptr; }