31 #ifndef DOXYGEN_SHOULD_SKIP_THIS 63 constexpr Id
hash(
const char *str, std::size_t sz) {
64 return sz == 0 ? 0xcbf29ce484222325 : (str[sz - 1] ^
hash(str
, sz - 1
)) * 0x100000001b3;
102 #ifndef DOXYGEN_SHOULD_SKIP_THIS constexpr const char * getData() const noexcept
Get a pointer to the string.
Definition: StringRef.h:111
constexpr Id hash(StringRef str)
Get an idenfitier from a string.
Definition: Id.h:78
The namespace for literals.
Definition: Id.h:82
constexpr Id hash(const char *str, std::size_t sz)
Get an identifier from a string.
Definition: Id.h:63
The namespace for gf classes.
Definition: Action.h:34
A constant reference to a string and its size.
Definition: StringRef.h:41
constexpr gf::Id operator"" _id(const char *str, std::size_t sz)
User defined operator for creating compile time ids from strings.
Definition: Id.h:96
constexpr Id InvalidId
The invalid id (which is 0)
Definition: Id.h:45
constexpr std::size_t getSize() const noexcept
Get the size of the string.
Definition: StringRef.h:120