Belle II Software development
Indirect Struct Reference

Functor to get the indirection 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->()))
 Operator getting the indirection of an arbitrary object.
 
template<class T >
const T & operator() (const T *t) const
 Specialisation for pointers that indirect to themselves.
 

Detailed Description

Functor to get the indirection from an arbitrary objects.

Definition at line 421 of file Functional.h.

Member Function Documentation

◆ operator()() [1/2]

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

Operator getting the indirection of an arbitrary object.

Definition at line 427 of file Functional.h.

428 {
429 assert(t.operator->() != nullptr);
430 return *(t.operator->());
431 }

◆ operator()() [2/2]

const T & operator() ( const T *  t) const
inline

Specialisation for pointers that indirect to themselves.

Definition at line 435 of file Functional.h.

436 {
437 assert(t != nullptr);
438 return *t;
439 }

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