the-algorithm/twml/libtwml/include/twml/Type.h
twitter-team ef4c5eb65e Twitter Recommendation Algorithm
Please note we have force-pushed a new initial commit in order to remove some publicly-available Twitter user information. Note that this process may be required in the future.
2023-03-31 17:36:31 -05:00

70 lines
1.0 KiB
C++

#pragma once
#include <twml/defines.h>
#include <stddef.h>
#include <stdint.h>
#ifdef __cplusplus
namespace twml {
template<typename T> struct Type;
template<> struct Type<float>
{
enum {
type = TWML_TYPE_FLOAT,
};
};
template<> struct Type<std::string>
{
enum {
type = TWML_TYPE_STRING,
};
};
template<> struct Type<double>
{
enum {
type = TWML_TYPE_DOUBLE,
};
};
template<> struct Type<int64_t>
{
enum {
type = TWML_TYPE_INT64,
};
};
template<> struct Type<int32_t>
{
enum {
type = TWML_TYPE_INT32,
};
};
template<> struct Type<int8_t>
{
enum {
type = TWML_TYPE_INT8,
};
};
template<> struct Type<uint8_t>
{
enum {
type = TWML_TYPE_UINT8,
};
};
template<> struct Type<bool>
{
enum {
type = TWML_TYPE_BOOL,
};
};
}
#endif