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. More... | |
Static Public Member Functions | |
template<typename Container > | |
constexpr static StrongID | generateUniqueKey (const Container &container) |
Generates an unique StrongID for a given container. More... | |
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 |
|
inlinestaticconstexpr |
|
inlineconstexpr |
Check if StrongID is valid.