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


Public Types | |
| using | value_type = Int |
| using | tag_type = Tag |
Private Attributes | |
| Int | value_ |
Friends | |
| std::ostream & | operator<< (std::ostream &s, TaggedInteger const &t) |
| std::istream & | operator>> (std::istream &s, TaggedInteger &t) |
| std::string | to_string (TaggedInteger const &t) |
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 26 of file tagged_integer.h.
| using xrpl::TaggedInteger< Int, Tag >::value_type = Int |
Definition at line 40 of file tagged_integer.h.
| using xrpl::TaggedInteger< Int, Tag >::tag_type = Tag |
Definition at line 41 of file tagged_integer.h.
|
default |
|
explicitconstexprnoexcept |
Definition at line 48 of file tagged_integer.h.
|
noexcept |
Definition at line 53 of file tagged_integer.h.
|
noexcept |
Definition at line 60 of file tagged_integer.h.
|
noexcept |
Definition at line 66 of file tagged_integer.h.
|
noexcept |
Definition at line 73 of file tagged_integer.h.
|
noexcept |
Definition at line 80 of file tagged_integer.h.
|
noexcept |
Definition at line 87 of file tagged_integer.h.
|
noexcept |
Definition at line 94 of file tagged_integer.h.
|
noexcept |
Definition at line 101 of file tagged_integer.h.
|
noexcept |
Definition at line 108 of file tagged_integer.h.
|
noexcept |
Definition at line 115 of file tagged_integer.h.
|
noexcept |
Definition at line 121 of file tagged_integer.h.
|
noexcept |
Definition at line 129 of file tagged_integer.h.
|
noexcept |
Definition at line 136 of file tagged_integer.h.
|
noexcept |
Definition at line 142 of file tagged_integer.h.
|
noexcept |
Definition at line 148 of file tagged_integer.h.
|
noexcept |
Definition at line 154 of file tagged_integer.h.
|
noexcept |
Definition at line 161 of file tagged_integer.h.
|
explicitnoexcept |
Definition at line 168 of file tagged_integer.h.
|
friend |
Definition at line 173 of file tagged_integer.h.
|
friend |
Definition at line 181 of file tagged_integer.h.
|
friend |
Definition at line 188 of file tagged_integer.h.
|
private |
Definition at line 37 of file tagged_integer.h.