Skip to content

Commit

Permalink
undid the fix for #136
Browse files Browse the repository at this point in the history
  • Loading branch information
nlohmann committed Dec 15, 2015
1 parent cd04a7d commit 1df5d72
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 41 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
19 changes: 0 additions & 19 deletions src/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <typename T>
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
Expand Down
19 changes: 0 additions & 19 deletions src/json.hpp.re2c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <typename T>
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
Expand Down

0 comments on commit 1df5d72

Please sign in to comment.