Belle II Software development
Constant< T > Struct Template Reference

Generic functor to wrap a constant as a function. More...

#include <Functional.h>

Public Member Functions

 operator FunctorTag ()
 Marker function for the isFunctor test.
 
 Constant (const T &t)
 Constructor from the constant value.
 
template<class S >
constexpr const T & operator() (const S &) const
 Operator returning the constant.
 

Private Attributes

m_t {}
 Memory for the constant to be returned.
 

Detailed Description

template<class T>
struct Belle2::TrackFindingCDC::Constant< T >

Generic functor to wrap a constant as a function.

Definition at line 39 of file Functional.h.

Constructor & Destructor Documentation

◆ Constant()

Constant ( const T &  t)
inlineexplicit

Constructor from the constant value.

Definition at line 46 of file Functional.h.

47 : m_t(t)
48 {
49 }
T m_t
Memory for the constant to be returned.
Definition: Functional.h:60

Member Function Documentation

◆ operator()()

constexpr const T & operator() ( const S &  ) const
inlineconstexpr

Operator returning the constant.

Definition at line 53 of file Functional.h.

54 {
55 return m_t;
56 }

Member Data Documentation

◆ m_t

T m_t {}
private

Memory for the constant to be returned.

Definition at line 60 of file Functional.h.


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