Skip to content

Commit

Permalink
Fixed windows.h include issue
Browse files Browse the repository at this point in the history
  • Loading branch information
danielaparker committed Nov 29, 2018
1 parent ac463c6 commit 877d2b4
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 10 deletions.
15 changes: 15 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
version 0.113.2
---------------

Bug fix

- On Windows platforms, fixed issue with macro expansion of max when
including windows.h

version 0.113.1
---------------

Bug fix

- Fixed compile issue with j = json::make_array().

version 0.113.1
---------------

Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,7 @@ The library includes four instantiations of `basic_json`:

```c++
#include <jsoncons/json.hpp>
#include <jsoncons_ext/cbor/cbor_serializer.hpp>
#include <jsoncons_ext/cbor/cbor_view.hpp>
#include <jsoncons_ext/cbor/cbor.hpp>
#include <jsoncons_ext/jsonpointer/jsonpointer.hpp>
#include <jsoncons_ext/csv/csv_serializer.hpp>

Expand All @@ -217,7 +216,7 @@ int main()
writer.begin_array(); // indefinite length outer array
writer.begin_array(3); // a fixed length array
writer.string_value("foo");
writer.byte_string_value(byte_string{'P','u','s','s'}); // default conversion to base64url
writer.byte_string_value(byte_string{'P','u','s','s'}); // no suggested conversion
writer.bignum_value("-18446744073709551617");
writer.end_array();
writer.end_array();
Expand Down Expand Up @@ -273,7 +272,7 @@ int main()

json another_array = json::array();
another_array.emplace_back(byte_string({'P','u','s','s'}),
byte_string_chars_format::base64); // expected conversion to base64
byte_string_chars_format::base64); // suggested conversion to base64
another_array.emplace_back("273.15", semantic_tag_type::decimal_fraction);
another_array.emplace(another_array.array_range().begin(),"bar"); // place at front

Expand Down
3 changes: 1 addition & 2 deletions examples/src/readme_examples.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
#include <string>
#include <vector>
#include <jsoncons/json.hpp>
#include <jsoncons_ext/cbor/cbor_serializer.hpp>
#include <jsoncons_ext/cbor/cbor_view.hpp>
#include <jsoncons_ext/cbor/cbor.hpp>
#include <jsoncons_ext/jsonpointer/jsonpointer.hpp>
#include <jsoncons_ext/csv/csv_serializer.hpp>

Expand Down
2 changes: 1 addition & 1 deletion examples/src/staj_iterator_examples.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright 2013 Daniel Parker
// Distributed under Boost license

#include <jsoncons/json.hpp>
#include <jsoncons/json_staj_reader.hpp>
#include <jsoncons/staj_iterator.hpp>
#include <jsoncons/json.hpp>
#include <string>
#include <sstream>

Expand Down
2 changes: 1 addition & 1 deletion include/jsoncons/bignum.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1459,7 +1459,7 @@ class basic_bignum : protected basic_bignum_base<Allocator>
};

template <class Allocator>
const uint64_t basic_bignum<Allocator>::max_basic_type = std::numeric_limits<uint64_t>::max();
const uint64_t basic_bignum<Allocator>::max_basic_type = (std::numeric_limits<uint64_t>::max)();
template <class Allocator>
const uint64_t basic_bignum<Allocator>::basic_type_bits = sizeof(uint64_t) * 8; // Number of bits
template <class Allocator>
Expand Down
2 changes: 1 addition & 1 deletion include/jsoncons/config/version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#define JSONCONS_VERSION_MAJOR 0
#define JSONCONS_VERSION_MINOR 113
#define JSONCONS_VERSION_PATCH 1
#define JSONCONS_VERSION_PATCH 2

namespace jsoncons {

Expand Down
5 changes: 4 additions & 1 deletion tests/src/bignum_tests.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Copyright 2013 Daniel Parker
// Distributed under Boost license

#if defined(_MSC_VER)
#include "windows.h"
#endif
#include <catch/catch.hpp>
#include <jsoncons/bignum.hpp>
#include <jsoncons/json.hpp>
Expand Down Expand Up @@ -76,7 +79,7 @@ TEST_CASE("test_negative_bignum")

TEST_CASE("test_longlong")
{
long long n = std::numeric_limits<long long>::max();
long long n = (std::numeric_limits<long long>::max)();

bignum val = n;

Expand Down

0 comments on commit 877d2b4

Please sign in to comment.