1#ifndef UVW_TYPE_INFO_INCLUDE_HPP
2#define UVW_TYPE_INFO_INCLUDE_HPP
17[[nodiscard]]
static constexpr std::uint32_t fnv1a(
const char *curr)
noexcept {
18 constexpr std::uint32_t offset = 2166136261;
19 constexpr std::uint32_t prime = 16777619;
23 value = (value ^
static_cast<std::uint32_t
>(*(curr++))) * prime;
29[[nodiscard]]
static inline std::uint32_t counter() noexcept {
30 static std::uint32_t cnt{};
34template<
typename Type>
35[[nodiscard]]
static std::uint32_t fake() noexcept {
36 static std::uint32_t local = counter();
52template<
typename Type>
53[[nodiscard]]
static constexpr std::uint32_t
type() noexcept {
54#if defined __clang__ || defined __GNUC__
55 return internal::fnv1a(__PRETTY_FUNCTION__);
57 return internal::fnv1a(__FUNCSIG__);
59 return internal::fake();
static constexpr std::uint32_t type() noexcept
Returns a numerical identifier for a given type.