Belle II Software  release-08-01-10
Scalar< T > Class Template Reference

Class wrapping a scalar type (for which std::is_scalar is true). More...

#include <Scalar.h>

Collaboration diagram for Scalar< T >:

Public Member Functions

 Scalar (T obj)
 Wrap scalar type as an object.
 
 operator T& () &
 Allow unpacking.
 
 operator T const & () const &
 Allow const unpacking.
 
operator-> () const
 Mimic the original item pointer access for the cast that T is a pointer.
 
std::remove_pointer< T >::type & operator* () const
 Dereferencing access for the case that T is a pointer.
 
bool operator< (const Scalar< T > &rhs) const
 Transport ordering.
 
bool operator== (const Scalar< T > &rhs) const
 Transport equality.
 

Private Attributes

m_obj
 Memory for the underlying scalar type.
 

Detailed Description

template<class T>
class Belle2::TrackFindingCDC::Scalar< T >

Class wrapping a scalar type (for which std::is_scalar is true).

Needed because you cannot inherit from scalar type directly in a mixin based inheritance structure. It does not support all the basic operations, but transperently unpacks if conversion to the underlying type is requested by the using context.

Definition at line 28 of file Scalar.h.


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