Skip to content

Commit

Permalink
fix for #166
Browse files Browse the repository at this point in the history
  • Loading branch information
nlohmann committed Jan 1, 2016
1 parent 3905406 commit 9b07504
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ I deeply appreciate the help of the following people.
- [ZahlGraf](https://github.com/ZahlGraf) added a workaround that allows compilation using Android NDK.
- [whackashoe](https://github.com/whackashoe) replaced a function that was marked as unsafe by Visual Studio.
- [406345](https://github.com/406345) fixed two small warnings.
- [Glen Fernandes](https://github.com/glenfe) noted a potential portability problem in the `has_mapped_type` function.

Thanks a lot for helping out!

Expand Down
4 changes: 2 additions & 2 deletions src/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ struct has_mapped_type
{
private:
template<typename C> static char test(typename C::mapped_type*);
template<typename C> static int test(...);
template<typename C> static char (&test(...))[2];
public:
enum { value = sizeof(test<T>(0)) == sizeof(char) };
static constexpr bool value = sizeof(test<T>(0)) == 1;
};

/// "equality" comparison for floating point numbers
Expand Down
4 changes: 2 additions & 2 deletions src/json.hpp.re2c
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ struct has_mapped_type
{
private:
template<typename C> static char test(typename C::mapped_type*);
template<typename C> static int test(...);
template<typename C> static char (&test(...))[2];
public:
enum { value = sizeof(test<T>(0)) == sizeof(char) };
static constexpr bool value = sizeof(test<T>(0)) == 1;
};

/// "equality" comparison for floating point numbers
Expand Down

0 comments on commit 9b07504

Please sign in to comment.