#include <Explicit.h>
Public Member Functions | |
Explicit () | |
Default constructor does not initialize the value. More... | |
Explicit (T value) | |
Construction from a fundamental value. More... | |
operator T () const | |
Implicit conversion back to the fundamental data type. More... | |
Public Attributes | |
T | value |
The actual fundamental value. More... | |
A thin wrapper around fundamental data types to give them a specific meaning and purpose. With this, you can write functions expecting, for example, an integer with a specific meaning, and forbidding integers with different meanings. The Meaning must be a "tag", i.e., an empty struct, whose name uniquely identifies the explicit class.
Usage example:
Definition at line 67 of file Explicit.h.
|
inline |
Default constructor does not initialize the value.
Definition at line 70 of file Explicit.h.
|
inline |
Construction from a fundamental value.
Definition at line 76 of file Explicit.h.
|
inline |
Implicit conversion back to the fundamental data type.
Definition at line 81 of file Explicit.h.
T icl_core::Explicit< T, Meaning >::value |
The actual fundamental value.
Definition at line 84 of file Explicit.h.