18 #include "../base/vector.h" 26 template<
typename TEST>
using TypeIDFilter = decltype(&TEST::TypeID);
30 return print_t::TypeID();
35 template<>
struct TypeID<void> {
static std::string
GetName() {
return "void"; } };
37 template<>
struct TypeID<bool> {
static std::string
GetName() {
return "bool"; } };
38 template<>
struct TypeID<double> {
static std::string
GetName() {
return "double"; } };
39 template<>
struct TypeID<float> {
static std::string
GetName() {
return "float"; } };
41 template<>
struct TypeID<char> {
static std::string
GetName() {
return "char"; } };
42 template<>
struct TypeID<char16_t> {
static std::string
GetName() {
return "char16_t"; } };
43 template<>
struct TypeID<char32_t> {
static std::string
GetName() {
return "char32_t"; } };
45 template<>
struct TypeID<int8_t> {
static std::string
GetName() {
return "int8_t"; } };
46 template<>
struct TypeID<int16_t> {
static std::string
GetName() {
return "int16_t"; } };
47 template<>
struct TypeID<int32_t> {
static std::string
GetName() {
return "int32_t"; } };
48 template<>
struct TypeID<int64_t> {
static std::string
GetName() {
return "int64_t"; } };
49 template<>
struct TypeID<uint8_t> {
static std::string
GetName() {
return "uint8_t"; } };
50 template<>
struct TypeID<uint16_t> {
static std::string
GetName() {
return "uint16_t"; } };
51 template<>
struct TypeID<uint32_t> {
static std::string
GetName() {
return "uint32_t"; } };
52 template<>
struct TypeID<uint64_t> {
static std::string
GetName() {
return "uint64_t"; } };
55 template<
typename T>
struct TypeID<T*> {
63 if (
sizeof...(Ts) > 0) out +=
",";
68 std::string out =
"emp::TypePack<";
76 static std::string
GetName() {
return "emp::TypePack<>"; }
81 static std::string
GetName() {
return "UnknownTemplate"; }
84 template<
template <
typename...>
class TEMPLATE,
typename... Ts>
97 template<>
struct TypeID<
std::string> {
static std::string
GetName() {
return "std::string"; } };
106 if (std::is_same<simple_vt,full_vt>::value) {
109 return "emp::vector<" +
TypeID<
TypePack<T,Ts...>>::GetTypes() +
">";
static std::string GetName()
Definition: TypeID.h:76
static std::string GetName()
Definition: TypeID.h:50
static std::string GetName()
Definition: TypeID.h:56
static std::string GetName()
Definition: TypeID.h:97
static std::string GetName()
Definition: TypeID.h:67
static std::string GetName()
Definition: TypeID.h:46
static std::string GetName()
Definition: TypeID.h:47
Definition: BitVector.h:785
static std::string GetName()
Definition: TypeID.h:35
static std::string GetName()
Definition: TypeID.h:86
static std::string GetName()
Definition: TypeID.h:38
static std::string GetName()
Definition: TypeID.h:37
static std::string GetName()
Definition: TypeID.h:81
decltype(&TEST::TypeID) TypeIDFilter
Definition: TypeID.h:26
A set of types that can be manipulated at compile time (good for metaprogramming) ...
static std::string GetName()
Definition: TypeID.h:51
static std::string GetName()
Definition: TypeID.h:41
static std::string GetName()
Definition: TypeID.h:52
static std::string GetName()
Definition: TypeID.h:42
static std::string GetName()
Definition: TypeID.h:28
static std::string GetName()
Definition: TypeID.h:48
If we are in emscripten, make sure to include the header.
Definition: array.h:37
Build a debug wrapper emp::vector around std::vector.
Definition: vector.h:42
static std::string GetName()
Definition: TypeID.h:49
static std::string GetTypes()
Definition: TypeID.h:61
static std::string GetName()
Definition: TypeID.h:39
static std::string GetTypes()
Definition: TypeID.h:75
static std::string GetName()
Definition: TypeID.h:43
static std::string TypeID()
Definition: TypeID.h:27
static std::string GetName()
Definition: TypeID.h:103
static std::string GetName()
Definition: TypeID.h:45
Definition: TypePack.h:71