SDEngine
Game Engine
Loading...
Searching...
No Matches
type_id.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include "
types.hpp
"
4
5
template
<
typename
T>
6
consteval
U64
type_id_of
() {
7
constexpr
std::string_view name =
__PRETTY_FUNCTION__
;
8
U64
hash
= 14695981039346656037ULL;
9
for
(
USize
i
= 0;
i
< name.size(); ++
i
) {
10
hash
^=
static_cast<
U8
>
(name[
i
]);
11
hash
*= 1099511628211ULL;
12
}
13
return
hash
;
14
}
type_id_of
consteval U64 type_id_of()
Definition
type_id.hpp:6
types.hpp
USize
std::size_t USize
Definition
types.hpp:18
U64
std::uint64_t U64
Definition
types.hpp:16
U8
std::uint8_t U8
Definition
types.hpp:13
SD
include
SD
core
type_id.hpp
Generated by
1.9.8