From a5a8c7b893e5e00f8c8a879383709fe58669b975 Mon Sep 17 00:00:00 2001 From: Alexander Nevskiy Date: Fri, 12 Jun 2015 23:52:44 +0300 Subject: [PATCH] Specifing __basic_json as full parameter. --- src/json.hpp | 42 ++++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/src/json.hpp b/src/json.hpp index 63f481408..25521bbe8 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -36,6 +36,10 @@ #endif #endif +#ifdef _MSC_VER + using ssize_t = long long; +#endif + /*! @brief namespace for Niels Lohmann @see https://github.com/nlohmann @@ -95,6 +99,12 @@ class basic_json // container types // ///////////////////// + #ifdef _MSC_VER + using __basic_json = basic_json<>; + #else + using __basic_json = basic_json; + #endif + /// the type of elements in a basic_json container using value_type = basic_json; @@ -383,10 +393,10 @@ class basic_json /// create an array (implicit) template ::value and - not std::is_same::value and - not std::is_same::value and - not std::is_same::value and + not std::is_same::value and + not std::is_same::value and + not std::is_same::value and + not std::is_same::value and not std::is_same::value and not std::is_same::value and std::is_constructible::value, int>::type @@ -576,8 +586,8 @@ class basic_json /// construct a JSON container given an iterator range template ::value or - std::is_same::value + std::is_same::value or + std::is_same::value , int>::type = 0> basic_json(T first, T last) @@ -903,7 +913,7 @@ class basic_json template ::value and - std::is_convertible::value + std::is_convertible<__basic_json, typename T::mapped_type>::value , int>::type = 0> T get_impl(T*) const { @@ -939,8 +949,8 @@ class basic_json /// get an array (explicit) template ::value and - not std::is_same::value and + std::is_convertible<__basic_json, typename T::value_type>::value and + not std::is_same<__basic_json, typename T::value_type>::value and not std::is_arithmetic::value and not std::is_convertible::value and not has_mapped_type::value @@ -969,8 +979,8 @@ class basic_json /// get an array (explicit) template ::value and - not std::is_same::value + std::is_convertible<__basic_json, T>::value and + not std::is_same<__basic_json, T>::value , int>::type = 0> std::vector get_impl(std::vector*) const { @@ -997,7 +1007,7 @@ class basic_json /// get an array (explicit) template ::value and + std::is_same<__basic_json, typename T::value_type>::value and not has_mapped_type::value , int>::type = 0> T get_impl(T*) const @@ -1294,8 +1304,8 @@ class basic_json /// remove element given an iterator template ::value or - std::is_same::value + std::is_same::value or + std::is_same::value , int>::type = 0> T erase(T pos) @@ -1354,8 +1364,8 @@ class basic_json /// remove elements given an iterator range template ::value or - std::is_same::value + std::is_same::value or + std::is_same::value , int>::type = 0> T erase(T first, T last)