mirror of
https://github.com/twitter/the-algorithm.git
synced 2024-06-01 08:48:46 +02:00
ef4c5eb65e
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.
70 lines
1.0 KiB
C++
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
|