mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-30 10:47:34 +02:00
Use enable_if_t
instead of enable_if
This commit is contained in:
@ -416,14 +416,14 @@ class VariantData {
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
typename enable_if<sizeof(T) == 4>::type setFloat(T value, ResourceManager*) {
|
||||
enable_if_t<sizeof(T) == 4> setFloat(T value, ResourceManager*) {
|
||||
ARDUINOJSON_ASSERT(type_ == VALUE_IS_NULL); // must call clear() first
|
||||
type_ = VALUE_IS_FLOAT;
|
||||
content_.asFloat = value;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
typename enable_if<sizeof(T) == 8>::type setFloat(T value, ResourceManager*);
|
||||
enable_if_t<sizeof(T) == 8> setFloat(T value, ResourceManager*);
|
||||
|
||||
template <typename T>
|
||||
enable_if_t<is_signed<T>::value> setInteger(T value,
|
||||
|
@ -65,8 +65,8 @@ inline const VariantExtension* VariantData::getExtension(
|
||||
#endif
|
||||
|
||||
template <typename T>
|
||||
typename enable_if<sizeof(T) == 8>::type VariantData::setFloat(
|
||||
T value, ResourceManager* resources) {
|
||||
enable_if_t<sizeof(T) == 8> VariantData::setFloat(T value,
|
||||
ResourceManager* resources) {
|
||||
ARDUINOJSON_ASSERT(type_ == VALUE_IS_NULL); // must call clear() first
|
||||
(void)resources; // silence warning
|
||||
|
||||
|
Reference in New Issue
Block a user