All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
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());
(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 103 of file operations.h.

Member Function Documentation

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

Returns *ptr.

Definition at line 107 of file operations.h.

107 { return *ptr; }

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