Reorganized polyfills

This commit is contained in:
Benoit Blanchon
2018-05-17 13:46:23 +02:00
parent 4592f23260
commit 58cb793c96
62 changed files with 431 additions and 378 deletions

View File

@@ -6,7 +6,7 @@
#include "Configuration.hpp"
#include "JsonVariantBase.hpp"
#include "TypeTraits/EnableIf.hpp"
#include "Polyfills/type_traits.hpp"
#ifdef _MSC_VER
#pragma warning(push)
@@ -36,7 +36,7 @@ class JsonObjectSubscript
// TValue = bool, char, long, int, short, float, double,
// std::string, String, JsonArray, JsonObject
template <typename TValue>
FORCE_INLINE typename EnableIf<!IsArray<TValue>::value, this_type&>::type
FORCE_INLINE typename enable_if<!is_array<TValue>::value, this_type&>::type
operator=(const TValue& src) {
_object.set(_key, src);
return *this;
@@ -70,7 +70,7 @@ class JsonObjectSubscript
// TValue = bool, char, long, int, short, float, double, RawJson, JsonVariant,
// std::string, String, JsonArray, JsonObject
template <typename TValue>
FORCE_INLINE typename EnableIf<!IsArray<TValue>::value, bool>::type set(
FORCE_INLINE typename enable_if<!is_array<TValue>::value, bool>::type set(
const TValue& value) {
return _object.set(_key, value);
}