|
| constexpr | Size () noexcept |
| | Zero.
|
| |
| template<Type::Integral T> |
| constexpr | Size (T value) noexcept |
| | From an integer count.
|
| |
| constexpr | Size (const Size &other) noexcept=default |
| | Copy constructor.
|
| |
| constexpr | Size (Size &&other) noexcept=default |
| | Move constructor.
|
| |
| constexpr | ~Size () noexcept=default |
| | Destructor.
|
| |
| constexpr Size & | operator= (const Size &other) noexcept=default |
| | Copy assignment.
|
| |
| constexpr Size & | operator= (Size &&other) noexcept=default |
| | Move assignment.
|
| |
| template<Type::Integral T> |
| constexpr Size & | operator= (T value) noexcept |
| | Assign an integer count.
|
| |
| constexpr | operator std::size_t () const noexcept |
| | Implicit host size_t (clamped).
|
| |
template<Type::Integral T>
requires (!Type::SameAs<T, std::size_t>) |
| constexpr | operator T () const noexcept |
| | Explicit conversion to an integral other than std::size_t.
|
| |
| | operator CString () const noexcept |
| | Decimal text owned by Base.
|
| |
| | operator WCString () const noexcept |
| | Decimal wide text owned by Base.
|
| |
| STORMBYTE_FORCE_INLINE | operator std::string () const |
| | Decimal text on the caller heap.
|
| |
| constexpr Size & | operator++ () noexcept |
| | Prefix increment.
|
| |
| constexpr Size | operator++ (int) noexcept |
| | Postfix increment.
|
| |
| constexpr Size & | operator-- () noexcept |
| | Prefix decrement.
|
| |
| constexpr Size | operator-- (int) noexcept |
| | Postfix decrement.
|
| |
| constexpr Size & | operator+= (Size other) noexcept |
| | Add other.
|
| |
| constexpr Size & | operator-= (Size other) noexcept |
| | Subtract other.
|
| |
| constexpr Size & | operator*= (Size other) noexcept |
| | Multiply by other.
|
| |
| constexpr Size & | operator/= (Size other) noexcept |
| | Divide by other.
|
| |
| constexpr Size & | operator%= (Size other) noexcept |
| | Remainder with other.
|
| |
| template<Type::Integral T> |
| constexpr Size & | operator+= (T value) noexcept |
| | Add an integer.
|
| |
| template<Type::Integral T> |
| constexpr Size & | operator-= (T value) noexcept |
| | Subtract an integer.
|
| |
| template<Type::Integral T> |
| constexpr Size & | operator*= (T value) noexcept |
| | Multiply by an integer.
|
| |
| template<Type::Integral T> |
| constexpr Size & | operator/= (T value) noexcept |
| | Divide by an integer.
|
| |
| template<Type::Integral T> |
| constexpr Size & | operator%= (T value) noexcept |
| | Remainder with an integer.
|
| |
|
| constexpr bool | operator== (Size lhs, Size rhs) noexcept |
| | Numeric equality.
|
| |
| template<Type::Integral T> |
| constexpr bool | operator== (Size lhs, T rhs) noexcept |
| | Mixed equality.
|
| |
| template<Type::Integral T> |
| constexpr bool | operator== (T lhs, Size rhs) noexcept |
| | Mixed equality.
|
| |
| constexpr std::strong_ordering | operator<=> (Size lhs, Size rhs) noexcept |
| | Numeric order.
|
| |
| template<Type::Integral T> |
| constexpr std::strong_ordering | operator<=> (Size lhs, T rhs) noexcept |
| | Mixed order.
|
| |
| template<Type::Integral T> |
| constexpr std::strong_ordering | operator<=> (T lhs, Size rhs) noexcept |
| | Mixed order.
|
| |
| constexpr Size | operator+ (Size lhs, Size rhs) noexcept |
| | Sum.
|
| |
| constexpr Size | operator- (Size lhs, Size rhs) noexcept |
| | Difference.
|
| |
| constexpr Size | operator* (Size lhs, Size rhs) noexcept |
| | Product.
|
| |
| constexpr Size | operator/ (Size lhs, Size rhs) noexcept |
| | Quotient.
|
| |
| constexpr Size | operator% (Size lhs, Size rhs) noexcept |
| | Remainder.
|
| |
| template<Type::Integral T> |
| constexpr Size | operator+ (Size lhs, T rhs) noexcept |
| | Mixed sum.
|
| |
| template<Type::Integral T> |
| constexpr Size | operator+ (T lhs, Size rhs) noexcept |
| | Mixed sum.
|
| |
| template<Type::Integral T> |
| constexpr Size | operator- (Size lhs, T rhs) noexcept |
| | Mixed difference.
|
| |
| template<Type::Integral T> |
| constexpr Size | operator- (T lhs, Size rhs) noexcept |
| | Mixed difference.
|
| |
| template<Type::Integral T> |
| constexpr Size | operator* (Size lhs, T rhs) noexcept |
| | Mixed product.
|
| |
| template<Type::Integral T> |
| constexpr Size | operator* (T lhs, Size rhs) noexcept |
| | Mixed product.
|
| |
| template<Type::Integral T> |
| constexpr Size | operator/ (Size lhs, T rhs) noexcept |
| | Mixed quotient.
|
| |
| template<Type::Integral T> |
| constexpr Size | operator/ (T lhs, Size rhs) noexcept |
| | Mixed quotient.
|
| |
| template<Type::Integral T> |
| constexpr Size | operator% (Size lhs, T rhs) noexcept |
| | Mixed remainder.
|
| |
| template<Type::Integral T> |
| constexpr Size | operator% (T lhs, Size rhs) noexcept |
| | Mixed remainder.
|
| |
Count of abstract units (uint64_t storage).
Not a byte length. Not std::size_t. Not std::ptrdiff_t. The value that crosses a DLL is always 64-bit unsigned.
Arithmetic always yields Size. Integer operands are absorbed. std::size_t calc = size1 + 3 * size2 does the math in uint64_t and converts once at the end.
Overflow of uint64_t and a negative result: assert when assertions are on; wrap modulo 2⁶⁴ when they are not. Division by zero: assert when assertions are on; undefined otherwise.
Implicit conversion exists only to std::size_t (clamp to size_t::max). Every other integral destination is explicit and clamps to T::max. There is no operator bool and no Value().
On hosts where std::size_t is unsigned long or unsigned long long, that conversion is the implicit operator std::size_t. Those two names are not given a second extern template of operator T().
Mixed comparison with any Type::Integral is a hidden friend so s == 5, 5u == s and ASSERT_EQUAL are not ambiguous with the built-in candidates. Comparison with StormByte::ByteSize lives in byte_size.hxx.
operator CString / operator WCString print decimal digits.