Belle II Software development
Deref Struct Reference

Functor to get the referenced object from an arbitrary objects. More...

#include <Functional.h>

Public Member Functions

 operator FunctorTag ()
 Marker function for the isFunctor test.
 
template<class T >
auto operator() (const T &t) const -> decltype(*t)
 Operator getting the referenced object of an arbitrary object.
 
template<class T >
auto operator() (const T *t) const -> decltype(*t)
 Specialisation for pointers to make an assertion that no nullptr is dereferenced.
 

Detailed Description

Functor to get the referenced object from an arbitrary objects.

Definition at line 390 of file Functional.h.

Member Function Documentation

◆ operator()() [1/2]

auto operator() ( const T &  t) const -> decltype(*t)
inline

Operator getting the referenced object of an arbitrary object.

Definition at line 396 of file Functional.h.

397 {
398 return *t;
399 }

◆ operator()() [2/2]

auto operator() ( const T *  t) const -> decltype(*t)
inline

Specialisation for pointers to make an assertion that no nullptr is dereferenced.

Definition at line 403 of file Functional.h.

404 {
405 assert(t != nullptr);
406 return *t;
407 }

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