LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
util::Dereferencer Struct Reference

Functor dereferencing the operand. More...

#include "operations.h"

Public Member Functions

template<typename T >
decltype(auto) operator() (T &&ptr) const
 Returns *ptr. More...
 

Detailed Description

Functor dereferencing the operand.

See also
util::dereference()

Example:

std::vector<int> values(ptrs.size());
std::transform
(ptrs.cbegin(), ptrs.cend(), values.begin(), util::Dereferencer{});

will fill the vector values with the values pointed by the elements in ptrs.

Definition at line 104 of file operations.h.

Member Function Documentation

template<typename T >
decltype(auto) util::Dereferencer::operator() ( T &&  ptr) const
inline

Returns *ptr.

Definition at line 108 of file operations.h.

109  {
110  return *ptr;
111  }

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