LArSoft  v09_90_00
Liquid Argon Software toolkit - https://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 41 of file DumpUtils.h.

References ptr_cbegin().

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

42  {
43  out << "{";
44  if (n == 0) {
45  out << "}";
46  return;
47  }
48  auto it = ptr_cbegin(a);
49  out << " " << *it;
50  std::size_t i = 0;
51  while (++i < n)
52  out << "; " << (*++it);
53  out << " }";
54  } // dumpArray()
std::add_const_t< T > * ptr_cbegin(T *ptr)
Definition: DumpUtils.h:34
Char_t n[5]
template<typename Coll >
auto lar::dump::details::ptr_cbegin ( Coll const &  v)

Definition at line 27 of file DumpUtils.h.

References util::cbegin().

Referenced by dumpArray().

28  {
29  using std::cbegin;
30  return cbegin(v);
31  }
decltype(auto) constexpr cbegin(T &&obj)
ADL-aware version of std::cbegin.
Definition: StdUtils.h:85
template<typename T >
std::add_const_t<T>* lar::dump::details::ptr_cbegin ( T *  ptr)

Definition at line 34 of file DumpUtils.h.

35  {
36  return ptr;
37  }