ztsdb
src
type_utils.hpp
1
#ifndef TYPE_UTILS_HPP
2
#define TYPE_UTILS_HPP
3
4
5
namespace
arr
{
6
9
template
<
typename
T>
10
struct
TypeNumber
{
11
static
const
unsigned
n = 0;
// unsigned LLL ???
12
};
13
15
#define TYPE_NB(T, n_p) template <> struct TypeNumber<T> { \
16
static const unsigned n = n_p; \
17
};
18
20
template
<
typename
T>
21
struct
TypeName
{
22
constexpr
static
const
char
* s =
"unknown"
;
23
};
24
26
#define TYPE_NAME(T, n_p) template <> struct TypeName<T> { \
27
constexpr static const char* s = n_p; \
28
};
29
30
31
}
32
33
#endif
arr::TypeName
Lets us define a compile time mapping from type to string.
Definition:
type_utils.hpp:21
arr::TypeNumber
Definition:
type_utils.hpp:10
arr
Contains the classes and functions that implement a multidimentional array type.
Definition:
allocator.hpp:29
Generated on Sun Jul 5 2020 18:04:52 for ztsdb by
1.8.17