|
rippled
|
A type-safe wrap around standard integral types. More...
#include <tagged_integer.h>


Public Types | |
| using | value_type = Int |
| using | tag_type = Tag |
Public Member Functions | |
| tagged_integer ()=default | |
Private Attributes | |
| Int | m_value |
A type-safe wrap around standard integral types.
The tag is used to implement type safety, catching mismatched types at compile time. Multiple instantiations wrapping the same underlying integral type are distinct types (distinguished by tag) and will not interoperate. A tagged_integer supports all the usual assignment, arithmetic, comparison and shifting operations defined for the underlying type
The tag is not meant as a unit, which would require restricting the set of allowed arithmetic operations.
Definition at line 27 of file tagged_integer.h.
| using ripple::tagged_integer< Int, Tag >::value_type = Int |
Definition at line 42 of file tagged_integer.h.
| using ripple::tagged_integer< Int, Tag >::tag_type = Tag |
Definition at line 43 of file tagged_integer.h.
|
default |
|
private |
Definition at line 39 of file tagged_integer.h.