![]() |
Belle II Software
release-08-02-04
|
Class wrapping a scalar type (for which std::is_scalar is true). More...
#include <Scalar.h>

Public Member Functions | |
| Scalar (T obj) | |
| Wrap scalar type as an object. | |
| operator T& () & | |
| Allow unpacking. | |
| operator T const & () const & | |
| Allow const unpacking. | |
| T | 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 | |
| T | m_obj |
| Memory for the underlying scalar type. | |
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.