From 1df5d726d95dec49cec35c6e57301b01e25cc30a Mon Sep 17 00:00:00 2001 From: Niels Date: Tue, 15 Dec 2015 18:34:07 +0100 Subject: [PATCH] undid the fix for #136 --- README.md | 9 ++++++--- src/json.hpp | 19 ------------------- src/json.hpp.re2c | 19 ------------------- 3 files changed, 6 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index a77961f2..cd9be0d3 100644 --- a/README.md +++ b/README.md @@ -42,12 +42,15 @@ to the files you want to use JSON objects. That's it. Do not forget to set the n Though it's 2015 already, the support for C++11 is still a bit sparse. Currently, the following compilers are known to work: -- GCC 4.9 - 5.2 (and possible later) -- Clang 3.4 - 3.7 (and possible later) -- Microsoft Visual C++ 14.0 RC (and possible later) +- GCC 4.9 - 5.2 (and possibly later) +- Clang 3.4 - 3.7 (and possibly later) +- Microsoft Visual C++ 14.0 RC (and possibly later) I would be happy to learn about other compilers/versions. +For GCC running on MinGW or Android SDK, the error `'to_string' is not a member of 'std'` (or similarly, for `strtod`) may occur. Note this is not an issue with the code, but rather with the compiler itself. Please refer to [this site](http://tehsausage.com/mingw-to-string) and [this discussion](https://github.com/nlohmann/json/issues/136) for information on how to fix this bug. + + ## Examples Here are some examples to give you an idea how to use the class. diff --git a/src/json.hpp b/src/json.hpp index 782657e1..3e9c9a3d 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -70,25 +70,6 @@ Class @ref nlohmann::basic_json is a good entry point for the documentation. using ssize_t = SSIZE_T; #endif -// workaround for Android NDK (see https://github.com/nlohmann/json/issues/136) -#ifdef __ANDROID__ -namespace std -{ -template -std::string to_string(T v) -{ - std::ostringstream ss; - ss << v; - return ss.str(); -} - -inline long double strtold(const char* str, char** str_end) -{ - return strtod(str, str_end); -} -} -#endif - /*! @brief namespace for Niels Lohmann @see https://github.com/nlohmann diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c index 682abb1c..383ddda7 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -70,25 +70,6 @@ Class @ref nlohmann::basic_json is a good entry point for the documentation. using ssize_t = SSIZE_T; #endif -// workaround for Android NDK (see https://github.com/nlohmann/json/issues/136) -#ifdef __ANDROID__ -namespace std -{ -template -std::string to_string(T v) -{ - std::ostringstream ss; - ss << v; - return ss.str(); -} - -inline long double strtold(const char* str, char** str_end) -{ - return strtod(str, str_end); -} -} -#endif - /*! @brief namespace for Niels Lohmann @see https://github.com/nlohmann