![]() |
XII Release 0.1.0
|
Curiously Recurring Template Pattern (CRTP) base for making trivially copyable structs hashable and comparable. More...
#include <HashableStruct.h>
Public Member Functions | |
| constexpr | xiiHashableStruct () noexcept |
| Default constructor. Initializes all bytes to zero. | |
| xiiHashableStruct (const xiiHashableStruct &other) noexcept | |
| Bitwise copy constructor. | |
| xiiHashableStruct & | operator= (const xiiHashableStruct &other) noexcept |
| Bitwise assignment operator. | |
| bool | operator== (const xiiHashableStruct &other) const noexcept |
| Compares equality via raw byte comparison. | |
| std::strong_ordering | operator<=> (const xiiHashableStruct &other) const noexcept |
| Compares ordering via raw byte comparison. | |
| xiiUInt32 | CalculateHash () const noexcept |
| Calculates a 32-bit hash from raw bytes of the struct. | |
| void | Clear () noexcept |
| Fills all bytes with zero. | |
| bool | IsZero () const noexcept |
| Returns true if all bytes are zero. | |
Curiously Recurring Template Pattern (CRTP) base for making trivially copyable structs hashable and comparable.
This class provides automatic zero-initialization, bitwise equality, ordering, hashing, and a set of utility functions. It is designed for descriptor-style types that contain raw data (including pointers) and no dynamic allocation or polymorphic behavior.
| DERIVED | The derived struct type using CRTP. |