8#include <source_location>
16 static constexpr size_t getId(std::source_location
const location = std::source_location::current())
22 static constexpr size_t generate(std::source_location
const& location)
24 size_t hash = 0xc6a4'a793'5bd1'e995;
28 hashCombine(hash,
static_cast<size_t>(location.column()) << 32u);
32 static constexpr void hashCombine(
size_t& seed, std::string_view value)
36 seed ^=
static_cast<size_t>(c) + 0x9e37'79b9 + (seed << 6) + (seed >> 2);
42 seed ^= value + 0x9e37'79b9 + (seed << 6) + (seed >> 2);
57 inline consteval size_t uniqueId(std::source_location
const location = std::source_location::current())
static constexpr size_t generate(std::source_location const &location)
static constexpr void hashCombine(size_t &seed, size_t value)
static constexpr size_t getId(std::source_location const location=std::source_location::current())
static constexpr void hashCombine(size_t &seed, std::string_view value)
consteval size_t uniqueId(std::source_location const location=std::source_location::current())
creates a unique id on any call