mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	Remove ARDUINOJSON_HAS_LONG_LONG (#1820)
				
					
				
			This commit is contained in:
		| @@ -5,10 +5,8 @@ | ||||
| #pragma once | ||||
|  | ||||
| #if __cplusplus >= 201103L | ||||
| #  define ARDUINOJSON_HAS_LONG_LONG 1 | ||||
| #  define ARDUINOJSON_HAS_RVALUE_REFERENCES 1 | ||||
| #else | ||||
| #  define ARDUINOJSON_HAS_LONG_LONG 0 | ||||
| #  define ARDUINOJSON_HAS_RVALUE_REFERENCES 0 | ||||
| #endif | ||||
|  | ||||
| @@ -77,8 +75,7 @@ | ||||
|  | ||||
| // Store integral values with long (0) or long long (1) | ||||
| #ifndef ARDUINOJSON_USE_LONG_LONG | ||||
| #  if ARDUINOJSON_HAS_LONG_LONG && defined(__SIZEOF_POINTER__) && \ | ||||
|           __SIZEOF_POINTER__ >= 4 ||                              \ | ||||
| #  if defined(__SIZEOF_POINTER__) && __SIZEOF_POINTER__ >= 4 || \ | ||||
|       defined(_MSC_VER) | ||||
| #    define ARDUINOJSON_USE_LONG_LONG 1 | ||||
| #  endif | ||||
|   | ||||
| @@ -21,12 +21,8 @@ typedef unsigned long JsonUInt; | ||||
|  | ||||
| }  // namespace ARDUINOJSON_NAMESPACE | ||||
|  | ||||
| #if ARDUINOJSON_HAS_LONG_LONG && !ARDUINOJSON_USE_LONG_LONG | ||||
| #  define ARDUINOJSON_ASSERT_INTEGER_TYPE_IS_SUPPORTED(T)                  \ | ||||
|     static_assert(sizeof(T) <= sizeof(ARDUINOJSON_NAMESPACE::JsonInteger), \ | ||||
|                   "To use 64-bit integers with ArduinoJson, you must set " \ | ||||
|                   "ARDUINOJSON_USE_LONG_LONG to 1. See "                   \ | ||||
|                   "https://arduinojson.org/v6/api/config/use_long_long/"); | ||||
| #else | ||||
| #  define ARDUINOJSON_ASSERT_INTEGER_TYPE_IS_SUPPORTED(T) | ||||
| #endif | ||||
| #define ARDUINOJSON_ASSERT_INTEGER_TYPE_IS_SUPPORTED(T)                  \ | ||||
|   static_assert(sizeof(T) <= sizeof(ARDUINOJSON_NAMESPACE::JsonInteger), \ | ||||
|                 "To use 64-bit integers with ArduinoJson, you must set " \ | ||||
|                 "ARDUINOJSON_USE_LONG_LONG to 1. See "                   \ | ||||
|                 "https://arduinojson.org/v6/api/config/use_long_long/"); | ||||
|   | ||||
| @@ -23,10 +23,8 @@ struct is_integral : integral_constant<bool, | ||||
|     is_same<typename remove_cv<T>::type, unsigned int>::value || | ||||
|     is_same<typename remove_cv<T>::type, signed long>::value || | ||||
|     is_same<typename remove_cv<T>::type, unsigned long>::value || | ||||
| #if ARDUINOJSON_HAS_LONG_LONG | ||||
|     is_same<typename remove_cv<T>::type, signed long long>::value || | ||||
|     is_same<typename remove_cv<T>::type, unsigned long long>::value || | ||||
| #endif | ||||
|     is_same<typename remove_cv<T>::type, char>::value || | ||||
|     is_same<typename remove_cv<T>::type, bool>::value> {}; | ||||
| // clang-format on | ||||
|   | ||||
| @@ -18,9 +18,7 @@ struct is_signed : integral_constant<bool, | ||||
|     is_same<typename remove_cv<T>::type, signed short>::value || | ||||
|     is_same<typename remove_cv<T>::type, signed int>::value || | ||||
|     is_same<typename remove_cv<T>::type, signed long>::value || | ||||
| #if ARDUINOJSON_HAS_LONG_LONG | ||||
|     is_same<typename remove_cv<T>::type, signed long long>::value || | ||||
| #endif | ||||
|     is_same<typename remove_cv<T>::type, float>::value || | ||||
|     is_same<typename remove_cv<T>::type, double>::value> {}; | ||||
| // clang-format on | ||||
|   | ||||
| @@ -17,9 +17,7 @@ struct is_unsigned : integral_constant<bool, | ||||
|     is_same<typename remove_cv<T>::type, unsigned short>::value || | ||||
|     is_same<typename remove_cv<T>::type, unsigned int>::value || | ||||
|     is_same<typename remove_cv<T>::type, unsigned long>::value || | ||||
| #if ARDUINOJSON_HAS_LONG_LONG | ||||
|     is_same<typename remove_cv<T>::type, unsigned long long>::value || | ||||
| #endif | ||||
|     is_same<typename remove_cv<T>::type, bool>::value> {}; | ||||
| // clang-format on | ||||
| }  // namespace ARDUINOJSON_NAMESPACE | ||||
|   | ||||
| @@ -33,10 +33,8 @@ struct make_unsigned<signed long> : type_identity<unsigned long> {}; | ||||
| template <> | ||||
| struct make_unsigned<unsigned long> : type_identity<unsigned long> {}; | ||||
|  | ||||
| #if ARDUINOJSON_HAS_LONG_LONG | ||||
| template <> | ||||
| struct make_unsigned<signed long long> : type_identity<unsigned long long> {}; | ||||
| template <> | ||||
| struct make_unsigned<unsigned long long> : type_identity<unsigned long long> {}; | ||||
| #endif | ||||
| }  // namespace ARDUINOJSON_NAMESPACE | ||||
|   | ||||
		Reference in New Issue
	
	Block a user