Strongly typed ID (cannot be assigned incorrectly to another ID) More...
#include <StrongID.h>
Public Types | |
| using | NumericType = IDType |
Public Member Functions | |
| constexpr | StrongID (IDType value) |
| constexpr bool | operator== (StrongID other) const |
| constexpr bool | operator!= (StrongID other) const |
| constexpr bool | isValid () const |
| Check if StrongID is valid. | |
Static Public Member Functions | |
| template<typename Container > | |
| static constexpr StrongID | generateUniqueKey (const Container &container) |
| Generates an unique StrongID for a given container. | |
Public Attributes | |
| IDType | identifier |
Strongly typed ID (cannot be assigned incorrectly to another ID)
| TagType | An empty class used just to tag this StrongID with a strong type |
| IDType | The primitive type (typically int or similar) used to represent the ID |
| InvalidValue | The sentinel primitive value that represents an invalid state of the ID |
|
inlinestaticnodiscardconstexpr |
|
inlinenodiscardconstexpr |
Check if StrongID is valid.