Skip to content

Commit 877d2b4

Browse files
committed
Fixed windows.h include issue
1 parent ac463c6 commit 877d2b4

File tree

7 files changed

+26
-10
lines changed

7 files changed

+26
-10
lines changed

ChangeLog.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
version 0.113.2
2+
---------------
3+
4+
Bug fix
5+
6+
- On Windows platforms, fixed issue with macro expansion of max when
7+
including windows.h
8+
9+
version 0.113.1
10+
---------------
11+
12+
Bug fix
13+
14+
- Fixed compile issue with j = json::make_array().
15+
116
version 0.113.1
217
---------------
318

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,7 @@ The library includes four instantiations of `basic_json`:
201201

202202
```c++
203203
#include <jsoncons/json.hpp>
204-
#include <jsoncons_ext/cbor/cbor_serializer.hpp>
205-
#include <jsoncons_ext/cbor/cbor_view.hpp>
204+
#include <jsoncons_ext/cbor/cbor.hpp>
206205
#include <jsoncons_ext/jsonpointer/jsonpointer.hpp>
207206
#include <jsoncons_ext/csv/csv_serializer.hpp>
208207

@@ -217,7 +216,7 @@ int main()
217216
writer.begin_array(); // indefinite length outer array
218217
writer.begin_array(3); // a fixed length array
219218
writer.string_value("foo");
220-
writer.byte_string_value(byte_string{'P','u','s','s'}); // default conversion to base64url
219+
writer.byte_string_value(byte_string{'P','u','s','s'}); // no suggested conversion
221220
writer.bignum_value("-18446744073709551617");
222221
writer.end_array();
223222
writer.end_array();
@@ -273,7 +272,7 @@ int main()
273272

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

examples/src/readme_examples.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
#include <string>
55
#include <vector>
66
#include <jsoncons/json.hpp>
7-
#include <jsoncons_ext/cbor/cbor_serializer.hpp>
8-
#include <jsoncons_ext/cbor/cbor_view.hpp>
7+
#include <jsoncons_ext/cbor/cbor.hpp>
98
#include <jsoncons_ext/jsonpointer/jsonpointer.hpp>
109
#include <jsoncons_ext/csv/csv_serializer.hpp>
1110

examples/src/staj_iterator_examples.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// Copyright 2013 Daniel Parker
22
// Distributed under Boost license
33

4+
#include <jsoncons/json.hpp>
45
#include <jsoncons/json_staj_reader.hpp>
56
#include <jsoncons/staj_iterator.hpp>
6-
#include <jsoncons/json.hpp>
77
#include <string>
88
#include <sstream>
99

include/jsoncons/bignum.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1459,7 +1459,7 @@ class basic_bignum : protected basic_bignum_base<Allocator>
14591459
};
14601460

14611461
template <class Allocator>
1462-
const uint64_t basic_bignum<Allocator>::max_basic_type = std::numeric_limits<uint64_t>::max();
1462+
const uint64_t basic_bignum<Allocator>::max_basic_type = (std::numeric_limits<uint64_t>::max)();
14631463
template <class Allocator>
14641464
const uint64_t basic_bignum<Allocator>::basic_type_bits = sizeof(uint64_t) * 8; // Number of bits
14651465
template <class Allocator>

include/jsoncons/config/version.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#define JSONCONS_VERSION_MAJOR 0
1313
#define JSONCONS_VERSION_MINOR 113
14-
#define JSONCONS_VERSION_PATCH 1
14+
#define JSONCONS_VERSION_PATCH 2
1515

1616
namespace jsoncons {
1717

tests/src/bignum_tests.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
// Copyright 2013 Daniel Parker
22
// Distributed under Boost license
33

4+
#if defined(_MSC_VER)
5+
#include "windows.h"
6+
#endif
47
#include <catch/catch.hpp>
58
#include <jsoncons/bignum.hpp>
69
#include <jsoncons/json.hpp>
@@ -76,7 +79,7 @@ TEST_CASE("test_negative_bignum")
7679

7780
TEST_CASE("test_longlong")
7881
{
79-
long long n = std::numeric_limits<long long>::max();
82+
long long n = (std::numeric_limits<long long>::max)();
8083

8184
bignum val = n;
8285

0 commit comments

Comments
 (0)