1 | // Copyright Benoit Blanchon 2014-2016
|
---|
2 | // MIT License
|
---|
3 | //
|
---|
4 | // Arduino JSON library
|
---|
5 | // https://github.com/bblanchon/ArduinoJson
|
---|
6 | // If you like this project, please add a star!
|
---|
7 |
|
---|
8 | #pragma once
|
---|
9 |
|
---|
10 | #include "../Configuration.hpp"
|
---|
11 | #include "IsSame.hpp"
|
---|
12 |
|
---|
13 | #include <stdint.h>
|
---|
14 |
|
---|
15 | namespace ArduinoJson {
|
---|
16 | namespace TypeTraits {
|
---|
17 |
|
---|
18 | // A meta-function that returns true if T is an integral type.
|
---|
19 | template <typename T>
|
---|
20 | struct IsIntegral {
|
---|
21 | static const bool value = TypeTraits::IsSame<T, signed char>::value ||
|
---|
22 | TypeTraits::IsSame<T, unsigned char>::value ||
|
---|
23 | TypeTraits::IsSame<T, signed short>::value ||
|
---|
24 | TypeTraits::IsSame<T, unsigned short>::value ||
|
---|
25 | TypeTraits::IsSame<T, signed int>::value ||
|
---|
26 | TypeTraits::IsSame<T, unsigned int>::value ||
|
---|
27 | TypeTraits::IsSame<T, signed long>::value ||
|
---|
28 | TypeTraits::IsSame<T, unsigned long>::value ||
|
---|
29 | #if ARDUINOJSON_USE_LONG_LONG
|
---|
30 | TypeTraits::IsSame<T, long long>::value ||
|
---|
31 | TypeTraits::IsSame<T, unsigned long long>::value ||
|
---|
32 | #endif
|
---|
33 |
|
---|
34 | #if ARDUINOJSON_USE_INT64
|
---|
35 | TypeTraits::IsSame<T, __int64>::value ||
|
---|
36 | TypeTraits::IsSame<T, unsigned __int64>::value ||
|
---|
37 | #endif
|
---|
38 | TypeTraits::IsSame<T, char>::value;
|
---|
39 | };
|
---|
40 | }
|
---|
41 | }
|
---|