Catos Engine (Source)
0.0.1
Lightweight Game engine
Loading...
Searching...
No Matches
type_utils.h
Go to the documentation of this file.
1
#pragma once
2
#include <typeinfo>
3
4
namespace
catos::type_utils
{
5
6
// -----Returns the name of the given type-----
7
template
<
typename
T>
8
std::string
get_type_name
() {
9
return
std::string(
typeid
(
T
).name());
10
};
11
12
// -----Returns the hash of the given Type-----
13
template
<
typename
T>
14
size_t
get_type_hash
() {
15
return
typeid
(
T
).
hash_code
();
16
}
17
18
19
20
}
catos::type_utils
Definition
type_utils.h:4
catos::type_utils::get_type_hash
size_t get_type_hash()
Definition
type_utils.h:14
catos::type_utils::get_type_name
std::string get_type_name()
Definition
type_utils.h:8