rapidjson.git
11 days agoMerge pull request #1453 from eidosmontreal/custom_malloc master
Milo Yip [Tue, 23 Jun 2020 06:34:10 +0000 (14:34 +0800)]
Merge pull request #1453 from eidosmontreal/custom_malloc

Adding a single customization point that ensures all allocations within rapidjson can be performed with a custom memory allocator

11 days agoMerge branch 'master' into custom_malloc 1453/head
Gaspard Petit [Tue, 23 Jun 2020 02:31:37 +0000 (22:31 -0400)]
Merge branch 'master' into custom_malloc

6 weeks agoMerge pull request #1720 from madeso/master
Milo Yip [Mon, 18 May 2020 16:25:35 +0000 (00:25 +0800)]
Merge pull request #1720 from madeso/master

Fixes issue #1718

6 weeks agoFixes issue #1718 1720/head
Gustav [Mon, 18 May 2020 12:06:39 +0000 (14:06 +0200)]
Fixes issue #1718

2 months agoMerge pull request #1689 from g199209/master
Milo Yip [Fri, 10 Apr 2020 09:34:09 +0000 (17:34 +0800)]
Merge pull request #1689 from g199209/master

Add CMake minimum version required.

2 months agoAdd CMake minimum version required. 1689/head
Gao Mingfei [Fri, 10 Apr 2020 06:50:51 +0000 (14:50 +0800)]
Add CMake minimum version required.

Interface Libraries feature is not available before CMake 3.0

Signed-off-by: Gao Mingfei <mingfei.gao@ucloud.cn>
3 months agoAdd a target to RapidJSONConfig.cmake.in (#1350)
Matteo Settenvini [Mon, 30 Mar 2020 02:29:56 +0000 (04:29 +0200)]
Add a target to RapidJSONConfig.cmake.in (#1350)

This way, users can call target_link_libraries against the imported target, which is the recommended way of doing things.

3 months agoci: upgrade distro to xenial and add arm64 test cases (#1662)
Jun [Mon, 30 Mar 2020 02:24:11 +0000 (10:24 +0800)]
ci: upgrade distro to xenial and add arm64 test cases (#1662)

Start from xenial, Travis supports multiple CPU architectures.
To bump to this version allows expand test coverage for more
architectures.
See: https://docs.travis-ci.com/user/reference/overview/#virtualisation-environment-vs-operating-system
Add arm64 test cases to matrix.

Change-Id: If61e2d38223dad70b542d6ec0afcf4a433c9debf
Signed-off-by: Jun He <jun.he@arm.com>
Co-authored-by: Jun He <jun.he@arm.com>
3 months agoUpdate Visual Studio Visualizer (#1665)
ioannis-e [Mon, 30 Mar 2020 02:22:52 +0000 (05:22 +0300)]
Update Visual Studio Visualizer (#1665)

1. Determine the correct type of string based on encoding
2. Omit string pointer address

3 months agoDoc: Fix some typos. (#1675)
仓鼠 [Mon, 30 Mar 2020 02:21:37 +0000 (21:21 -0500)]
Doc: Fix some typos. (#1675)

3 months agoThree-way comparison for CLang 10 fix (#1679)
Nikolay [Mon, 30 Mar 2020 02:20:35 +0000 (07:20 +0500)]
Three-way comparison for CLang 10 fix (#1679)

C++20 features must enable additional functionality, not to change interface completely

3 months agoAvoid warnings when using -std=c++20 and clang 10: use three way comparision for...
Romain Geissler @ Amadeus [Fri, 20 Mar 2020 05:39:48 +0000 (06:39 +0100)]
Avoid warnings when using -std=c++20 and clang 10: use three way comparision for iterators when possible. (#1667)

/data/mwrep/res/osp/RapidJson/20-0-0-0/include/rapidjson/document.h:729:58: error: use of overloaded operator '!=' is ambiguous (with operand types 'rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::MemberIterator' (aka 'rapidjson::GenericMemberIterator<false, rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >') and 'rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::MemberIterator')
                for (MemberIterator m = MemberBegin(); m != MemberEnd(); ++m)

3 months agoReplace RAPIDJSON_CLZLL with internal clzll (#1660)
Jun [Wed, 11 Mar 2020 07:11:25 +0000 (15:11 +0800)]
Replace RAPIDJSON_CLZLL with internal clzll (#1660)

RAPIDJSON_CLZLL is defined as macro of __builtin_clzll when
using gcc to compile. This introduces two issues:
1. in gcc __builtin_clzll returns int, not uint32_t.
2. __builtin_clzll return is undefined when input x is 0
See: https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html

This patch removes RAPIDJSON_CLZLL, merges __builtin_clzll to
internal clzll with input check and return value explicit cast.

Change-Id: Iac4b355dc5e5b4ed9b3f35a640b6b5537e76f22c
Signed-off-by: Jun He <jun.he@arm.com>
Co-authored-by: Jun He <jun.he@arm.com>
4 months agoPrettyWriter constructor uninitialized member (#1654)
Milo Yip [Thu, 5 Mar 2020 06:13:11 +0000 (14:13 +0800)]
PrettyWriter constructor uninitialized member (#1654)

Fix #1653

4 months agoUpdate biginteger.h (#1652)
Milo Yip [Thu, 5 Mar 2020 03:06:01 +0000 (11:06 +0800)]
Update biginteger.h (#1652)

Fix intel compiler macro
https://github.com/Tencent/rapidjson/commit/de6681e295726f528a4b449ca51c940972eb6f1a#commitcomment-37645051

4 months agoCloses #1643 (#1644)
mdamle [Tue, 25 Feb 2020 03:34:28 +0000 (19:34 -0800)]
Closes #1643 (#1644)

This change comes up with compile time pre-processor directives to
tune the behavior of rapidjson wrt memory consumption. The idea is to
allow each module using this library to choose the right defaults based
on how it consumes memory and what performance it expects.

1. RAPIDJSON_DEFAULT_ALLOCATOR: If defined allows you to choose
CrtAllocator over MemoryPoolAllocator. If it is not defined, chooses MemoryPoolAllocator by default.
2. RAPIDJSON_DEFAULT_STACK_ALLOCATOR: If defined allows you to choose
MemoryPoolAllocator over CrtAllocator. If it is not defined, chooses CrtAllocator by default.
3. RAPIDJSON_VALUE_DEFAULT_OBJECT_CAPACITY and RAPIDJSON_VALUE_DEFAULT_ARRAY_CAPACITY: If defined and set to a
value, uses that value for default number of objects/array elements to be pre-allocated. If not defined,
uses value of 16: the current default.

Verified that all tests pass.

4 months agoFix simple typo: drived -> derived (#1646)
Tim Gates [Fri, 21 Feb 2020 07:46:10 +0000 (18:46 +1100)]
Fix simple typo: drived -> derived (#1646)

Closes #1645

4 months agoAllow escaped apostrophe in values (#1639)
xpahos [Thu, 13 Feb 2020 01:53:15 +0000 (04:53 +0300)]
Allow escaped apostrophe in values (#1639)

* Allow escaped apostrophe in values

* Allow escaped apostrophe in values

* Canonical flag name

* Add translation for escaped apostrophe

Co-authored-by: Milo Yip <miloyip@gmail.com>
5 months agoMerge pull request #1631 from PhoebeHui/dev/Phoebe/vcpkg_instructions
Milo Yip [Fri, 17 Jan 2020 01:55:44 +0000 (09:55 +0800)]
Merge pull request #1631 from PhoebeHui/dev/Phoebe/vcpkg_instructions

Add vcpkg installation instructions

5 months agoAdd vcpkg installation instructions 1631/head
PhoebeHui [Thu, 16 Jan 2020 11:09:20 +0000 (03:09 -0800)]
Add vcpkg installation instructions

7 months agoMerge pull request #1502 from ylavic/compilation_fixes
Milo Yip [Tue, 3 Dec 2019 01:51:05 +0000 (09:51 +0800)]
Merge pull request #1502 from ylavic/compilation_fixes

Compilation fixes

7 months agoMerge pull request #1617 from JPEWdev/master
Milo Yip [Tue, 3 Dec 2019 01:49:40 +0000 (09:49 +0800)]
Merge pull request #1617 from JPEWdev/master

Remove shadow typedef

7 months agoRemove shadow typedef 1617/head
Joshua Watt [Mon, 2 Dec 2019 15:11:25 +0000 (09:11 -0600)]
Remove shadow typedef

Removes a duplicate and identical typedef that was causing a
'declaration shadows typedef' (-Wshadow) warning in clang.

7 months agoMerge pull request #1609 from piratf/readme_contributing
Milo Yip [Mon, 25 Nov 2019 03:54:59 +0000 (11:54 +0800)]
Merge pull request #1609 from piratf/readme_contributing

add contributing section in readme.md

7 months agoadd contributing section in readme.md, introduced the basic cooperation process. 1609/head
piratf [Tue, 12 Nov 2019 08:03:21 +0000 (16:03 +0800)]
add contributing section in readme.md, introduced the basic cooperation process.

7 months agoMerge pull request #1603 from piratf/cmakelist_upgrade
Milo Yip [Mon, 11 Nov 2019 10:03:54 +0000 (18:03 +0800)]
Merge pull request #1603 from piratf/cmakelist_upgrade

fix CMake policy CMP0048 warning #1154

7 months agofix CMake policy CMP0048 warning #1154 1603/head
piratf [Mon, 11 Nov 2019 08:09:43 +0000 (16:09 +0800)]
fix CMake policy CMP0048 warning #1154

8 months agoMerge pull request #1548 from TranslucentTB/master
Milo Yip [Fri, 1 Nov 2019 02:53:00 +0000 (10:53 +0800)]
Merge pull request #1548 from TranslucentTB/master

Fix ARM NEON under MSVC

8 months agoMerge branch 'master' of https://github.com/Tencent/rapidjson 1548/head
Charles Milette [Fri, 1 Nov 2019 01:10:28 +0000 (21:10 -0400)]
Merge branch 'master' of https://github.com/Tencent/rapidjson

8 months agoMerge pull request #1591 from veekxt/patch-1
Milo Yip [Mon, 21 Oct 2019 13:19:59 +0000 (21:19 +0800)]
Merge pull request #1591 from veekxt/patch-1

fix a typo of doc

8 months agodoc: fix a typo 1591/head
VeekXT [Fri, 18 Oct 2019 10:49:15 +0000 (18:49 +0800)]
doc: fix a typo

8 months agoMerge pull request #1529 from rkoshy/master
Milo Yip [Tue, 15 Oct 2019 01:49:27 +0000 (09:49 +0800)]
Merge pull request #1529 from rkoshy/master

Fixed a build issue by initializing "index" in the header file

8 months agoMerge pull request #1582 from crazyscot/master
Milo Yip [Tue, 8 Oct 2019 02:12:13 +0000 (10:12 +0800)]
Merge pull request #1582 from crazyscot/master

Use C++17 fallthrough tag instead of disabling compiler warning

8 months agoMerge pull request #1544 from fredgan/master
Milo Yip [Tue, 8 Oct 2019 01:57:38 +0000 (09:57 +0800)]
Merge pull request #1544 from fredgan/master

修复文档中的错误

8 months agofix some misspellings 1544/head
fredgan [Tue, 8 Oct 2019 01:25:51 +0000 (09:25 +0800)]
fix some misspellings

9 months agoUse C++17 fallthrough tag instead of disabling warning 1582/head
Ross Younger [Tue, 1 Oct 2019 05:48:29 +0000 (18:48 +1300)]
Use C++17 fallthrough tag instead of disabling warning

Signed-off-by: Ross Younger <crazyscot@gmail.com>
9 months agoMerge pull request #1490 from MalcolmTyrrell/fixCompileErrorInPointerH
Milo Yip [Thu, 26 Sep 2019 02:08:13 +0000 (10:08 +0800)]
Merge pull request #1490 from MalcolmTyrrell/fixCompileErrorInPointerH

Fix vs2017 compile error C2105: '--' needs l-value

9 months agoMerge pull request #1579 from Tencent/vs2010
Milo Yip [Thu, 26 Sep 2019 02:07:46 +0000 (10:07 +0800)]
Merge pull request #1579 from Tencent/vs2010

Fix VS2010 build via disabling copy constructor in GenericMember

9 months agoProvide default implementations for move constructor/assignment in GenericMember vs2010 1579/head
Milo Yip [Wed, 25 Sep 2019 12:20:20 +0000 (20:20 +0800)]
Provide default implementations for move constructor/assignment in GenericMember

9 months agoDisable copy constructor in GenericMember
Milo Yip [Wed, 25 Sep 2019 10:02:17 +0000 (18:02 +0800)]
Disable copy constructor in GenericMember

9 months agoMerge pull request #1573 from esrrhs/master
Milo Yip [Wed, 25 Sep 2019 06:27:37 +0000 (14:27 +0800)]
Merge pull request #1573 from esrrhs/master

fix travis build

9 months agoUpdate travis-doxygen.sh 1573/head
zhao xin [Wed, 25 Sep 2019 03:17:28 +0000 (11:17 +0800)]
Update travis-doxygen.sh

9 months agoUpdate travis-doxygen.sh
zhao xin [Wed, 25 Sep 2019 03:16:55 +0000 (11:16 +0800)]
Update travis-doxygen.sh

9 months agoUpdate travis-doxygen.sh
zhao xin [Wed, 25 Sep 2019 03:16:26 +0000 (11:16 +0800)]
Update travis-doxygen.sh

9 months agoUpdate travis-doxygen.sh
zhao xin [Wed, 25 Sep 2019 03:16:06 +0000 (11:16 +0800)]
Update travis-doxygen.sh

9 months agoUpdate .travis.yml
zhao xin [Wed, 25 Sep 2019 02:26:39 +0000 (10:26 +0800)]
Update .travis.yml

9 months agoUpdate .travis.yml
zhao xin [Wed, 25 Sep 2019 02:17:39 +0000 (10:17 +0800)]
Update .travis.yml

9 months agoMerge pull request #1567 from AtnNn/master
Milo Yip [Thu, 12 Sep 2019 09:40:00 +0000 (17:40 +0800)]
Merge pull request #1567 from AtnNn/master

Allow pointer tokens to have non-null-terminated strings

9 months agoadd test for non-null-terminated token 1567/head
Etienne Laurin [Thu, 12 Sep 2019 07:12:06 +0000 (08:12 +0100)]
add test for non-null-terminated token

9 months agofix template parameter
Etienne Laurin [Wed, 11 Sep 2019 16:23:15 +0000 (17:23 +0100)]
fix template parameter

9 months agoAllow pointer tokens to have non-null-terminated strings
Etienne Laurin [Wed, 11 Sep 2019 16:03:35 +0000 (17:03 +0100)]
Allow pointer tokens to have non-null-terminated strings

10 months agoMerge pull request #1557 from MBoldyrev/doc/fix-uint-case
Milo Yip [Fri, 23 Aug 2019 07:07:50 +0000 (15:07 +0800)]
Merge pull request #1557 from MBoldyrev/doc/fix-uint-case

Documentation: fixed Uint case

10 months agofixed Uint case in docs 1557/head
Mikhail Boldyrev [Thu, 22 Aug 2019 16:55:00 +0000 (19:55 +0300)]
fixed Uint case in docs

11 months agoChange #ifdef to #if defined
Charles Milette [Thu, 25 Jul 2019 21:17:52 +0000 (17:17 -0400)]
Change #ifdef to #if defined

11 months agoUpdate comment
Charles Milette [Thu, 25 Jul 2019 21:12:48 +0000 (17:12 -0400)]
Update comment

11 months agoFix signedness error
Charles Milette [Thu, 25 Jul 2019 21:09:52 +0000 (17:09 -0400)]
Fix signedness error

11 months agoFix build error under non-Clang compilers
Charles Milette [Thu, 25 Jul 2019 20:55:34 +0000 (16:55 -0400)]
Fix build error under non-Clang compilers

11 months agoFix ARM NEON under MSVC
Charles Milette [Thu, 25 Jul 2019 20:21:11 +0000 (16:21 -0400)]
Fix ARM NEON under MSVC

11 months agoMerge pull request #1 from Tencent/master
FredGan [Tue, 16 Jul 2019 12:18:56 +0000 (20:18 +0800)]
Merge pull request #1 from Tencent/master

Change all GenericMemberIterator from struct to class

12 months agoChange all GenericMemberIterator from struct to class
Milo Yip [Fri, 28 Jun 2019 02:37:13 +0000 (10:37 +0800)]
Change all GenericMemberIterator from struct to class

12 months ago- Fixed a build issue by initializing "index" in the header file 1529/head
Renny Koshy [Sat, 22 Jun 2019 03:55:32 +0000 (23:55 -0400)]
- Fixed a build issue by initializing "index" in the header file

13 months agoMerge pull request #1506 from ylavic/CreatePattern
Milo Yip [Fri, 17 May 2019 01:27:30 +0000 (09:27 +0800)]
Merge pull request #1506 from ylavic/CreatePattern

Add missing curly brackets in STDREGEX's CreatePattern().

13 months agoRAPIDJSON_NOEXCEPT_ASSERT() should never throw. 1502/head
ylavic [Thu, 11 Apr 2019 22:31:28 +0000 (00:31 +0200)]
RAPIDJSON_NOEXCEPT_ASSERT() should never throw.

clang warns about throwing from RAPIDJSON_NOEXCEPT_ASSERT() in a nothrow
context.

If RAPIDJSON_ASSERT() throws it can never be used for _NOEXCEPT_ASSERT(),
so use C assert() instead.

Finally (and originally), since RAPIDJSON_ASSERT() in "unittest.h" throws,
make it define RAPIDJSON_ASSERT_THROWS for RAPIDJSON_NOEXCEPT_ASSERT() to
now do the right thing.

13 months agoFix compilation of sortkeys.cpp with MSVC 2013 (hopefully).
ylavic [Sat, 27 Apr 2019 22:51:20 +0000 (00:51 +0200)]
Fix compilation of sortkeys.cpp with MSVC 2013 (hopefully).

14 months agoAdd missing curly brackets in STDREGEX's CreatePattern(). 1506/head
ylavic [Mon, 29 Apr 2019 13:06:52 +0000 (15:06 +0200)]
Add missing curly brackets in STDREGEX's CreatePattern().

14 months agoFix vs2017 compile error C2105: '--' needs l-value 1490/head
Malcolm Tyrrell [Mon, 15 Apr 2019 09:00:14 +0000 (10:00 +0100)]
Fix vs2017 compile error C2105: '--' needs l-value

14 months agoMerge pull request #1488 from somone23412/somone23412-fix-typo-1
Milo Yip [Mon, 15 Apr 2019 01:25:18 +0000 (09:25 +0800)]
Merge pull request #1488 from somone23412/somone23412-fix-typo-1

Update pointer.zh-cn.md : fix typo

14 months agofix typo 1488/head
quyan [Sun, 14 Apr 2019 16:43:37 +0000 (00:43 +0800)]
fix typo

14 months agoMerge pull request #1481 from liangdzou/patch-1
Milo Yip [Tue, 9 Apr 2019 05:21:59 +0000 (13:21 +0800)]
Merge pull request #1481 from liangdzou/patch-1

add missing header "ios"

14 months agoadd missing header "ios" 1481/head
Liang ZOU [Tue, 9 Apr 2019 02:55:57 +0000 (10:55 +0800)]
add missing header "ios"

add missing header "ios" for symbol "std:: streamsize"

14 months agoMerge pull request #1479 from MaxXSoft/patch-tutorial
Milo Yip [Tue, 9 Apr 2019 01:42:14 +0000 (09:42 +0800)]
Merge pull request #1479 from MaxXSoft/patch-tutorial

doc/tutorial.zh-cn: fixed some typos

14 months agodoc/tutorial.zh-cn: fixed some typos 1479/head
MaxXSoft [Mon, 8 Apr 2019 11:20:06 +0000 (19:20 +0800)]
doc/tutorial.zh-cn: fixed some typos

15 months agoMerge pull request #1477 from eisaev/patch-1
Milo Yip [Thu, 4 Apr 2019 06:50:21 +0000 (14:50 +0800)]
Merge pull request #1477 from eisaev/patch-1

Fixed typo in allocators.h

15 months agoUpdate allocators.h 1477/head
eisaev [Wed, 3 Apr 2019 17:10:30 +0000 (22:10 +0500)]
Update allocators.h

Fixed typo

15 months agoMerge pull request #1462 from ra1u/master
Milo Yip [Mon, 11 Mar 2019 02:35:27 +0000 (10:35 +0800)]
Merge pull request #1462 from ra1u/master

Allow user to define custom RAPIDJSON_NOEXCEPT_ASSERT macro

15 months agoAllow user to define custom RAPIDJSON_NOEXCEPT_ASSERT macro 1462/head
Luka Rahne [Sun, 10 Mar 2019 17:52:46 +0000 (18:52 +0100)]
Allow user to define custom RAPIDJSON_NOEXCEPT_ASSERT macro

16 months agoMerge pull request #727 from mapbox/silence-dereference-null-pointer
Milo Yip [Wed, 6 Mar 2019 01:33:13 +0000 (09:33 +0800)]
Merge pull request #727 from mapbox/silence-dereference-null-pointer

Silence false positive clang-tidy warning

16 months agoUpdate doxygen download URL
Milo Yip [Mon, 11 Feb 2019 07:17:59 +0000 (15:17 +0800)]
Update doxygen download URL

16 months agoWorkaround of sortkeys example
Milo Yip [Mon, 11 Feb 2019 06:14:35 +0000 (14:14 +0800)]
Workaround of sortkeys example

16 months agoAdded parameters to RAPIDJSON_MALLOC, RAPIDJSON_REALLOC and RAPIDJSON_FREE
Gaspard Petit [Sun, 10 Feb 2019 06:15:35 +0000 (01:15 -0500)]
Added parameters to RAPIDJSON_MALLOC, RAPIDJSON_REALLOC and RAPIDJSON_FREE

Signed-off-by: Gaspard Petit <gaspard.petit@eidosmontreal.com>
16 months agoAdding a single customization point that ensures all allocations within rapidjson...
Gaspard Petit [Sun, 10 Feb 2019 05:32:26 +0000 (00:32 -0500)]
Adding a single customization point that ensures all allocations within rapidjson can be performed with a custom memory allocator; Introduces the macros RAPIDJSON_MALLOC, RAPIDJSON_REALLOC, and RAPIDJSON_FREE.

Signed-off-by: Gaspard Petit <gaspard.petit@eidosmontreal.com>
16 months agoAdding swap() for GenericMember
Milo Yip [Fri, 8 Feb 2019 03:39:25 +0000 (11:39 +0800)]
Adding swap() for GenericMember

16 months agoFix gcc compilation error in sortkeys
Milo Yip [Wed, 6 Feb 2019 12:35:20 +0000 (20:35 +0800)]
Fix gcc compilation error in sortkeys

16 months agoUpdate sortkeys.cpp
Milo Yip [Wed, 6 Feb 2019 11:59:09 +0000 (19:59 +0800)]
Update sortkeys.cpp

16 months agoMerge pull request #1421 from HomeControlAS/sort_by_name_example
Milo Yip [Wed, 6 Feb 2019 11:52:54 +0000 (19:52 +0800)]
Merge pull request #1421 from HomeControlAS/sort_by_name_example

added example for sorting keys

16 months agoMerge pull request #1439 from ylavic/schema_pointer_allocator
Milo Yip [Wed, 6 Feb 2019 11:31:03 +0000 (19:31 +0800)]
Merge pull request #1439 from ylavic/schema_pointer_allocator

Use the allocator of the Schema for its Pointer.

16 months agoMerge pull request #1442 from rbilovol/cmake-fixup
Milo Yip [Wed, 6 Feb 2019 11:30:43 +0000 (19:30 +0800)]
Merge pull request #1442 from rbilovol/cmake-fixup

CMake: remove hardcoded CMAKECONFIG_INSTALL_DIR path

16 months agoMerge pull request #1444 from leolchat/patch-1
Milo Yip [Wed, 6 Feb 2019 11:30:11 +0000 (19:30 +0800)]
Merge pull request #1444 from leolchat/patch-1

Correct complexity claim

17 months agoCorrect complexity claim 1444/head
Léonard Gérard [Fri, 1 Feb 2019 06:29:07 +0000 (22:29 -0800)]
Correct complexity claim

17 months agoCMake: remove hardcoded CMAKECONFIG_INSTALL_DIR path 1442/head
Ruslan Bilovol [Thu, 24 Jan 2019 16:11:39 +0000 (18:11 +0200)]
CMake: remove hardcoded CMAKECONFIG_INSTALL_DIR path

Currently this path is hardcoded to lib/cmake.
Some distributions have different library path (like lib64).
So reuse LIB_INSTALL_DIR for that to make CMAKECONFIG_INSTALL_DIR
configurable and usable in such distros.

Signed-off-by: Ruslan Bilovol <rbilovol@cisco.com>
17 months agoUse the allocator of the Schema for its Pointer. 1439/head
ylavic [Thu, 10 Jan 2019 17:42:16 +0000 (18:42 +0100)]
Use the allocator of the Schema for its Pointer.

The Pointer passed to construct the Schema can be from the stack or any
transient storage, so the copy stored in the Schema must have the same
lifetime/allocator as the Schema itself.

18 months agoMerge pull request #1426 from ylavic/pointer_less_than
Milo Yip [Wed, 19 Dec 2018 08:25:09 +0000 (16:25 +0800)]
Merge pull request #1426 from ylavic/pointer_less_than

Add "less than" operator to Pointer.

18 months agoMerge branch 'master' into pointer_less_than 1426/head
Milo Yip [Tue, 18 Dec 2018 01:32:09 +0000 (09:32 +0800)]
Merge branch 'master' into pointer_less_than

18 months agoMerge pull request #1431 from ylavic/pointer_swap
Milo Yip [Tue, 18 Dec 2018 01:31:05 +0000 (09:31 +0800)]
Merge pull request #1431 from ylavic/pointer_swap

Allow to (std::)Swap two pointers.

18 months agoPointer tests now need <algorithm> (for std::swap), but no tabs. 1431/head
ylavic [Mon, 17 Dec 2018 13:42:09 +0000 (14:42 +0100)]
Pointer tests now need <algorithm> (for std::swap), but no tabs.

18 months agoAllow to (std::)Swap two pointers.
ylavic [Mon, 17 Dec 2018 13:33:32 +0000 (14:33 +0100)]
Allow to (std::)Swap two pointers.

18 months agoSpeed up Pointer::operator<().
ylavic [Wed, 12 Dec 2018 21:32:56 +0000 (22:32 +0100)]
Speed up Pointer::operator<().

Speed is more important than alphabetical order (which makes few sense in
JSON in general, and with pointers especially). The use case is indexing
in std containers, i.e. O(log n) with rbtree, so the faster comparison
the better.

18 months agoRework Pointer::operator<() loop.
ylavic [Mon, 10 Dec 2018 23:40:05 +0000 (00:40 +0100)]
Rework Pointer::operator<() loop.

I must be too dumb to understand the mess MSVC (32bit only) did with the
previous loop, and to figure out how it might have make it never end.
Anyway, hopefully any compiler can grok this new loop...

18 months agoUnit test for Pointer::operator<().
ylavic [Mon, 10 Dec 2018 23:19:13 +0000 (00:19 +0100)]
Unit test for Pointer::operator<().

18 months agoAdd less than operator to Pointer.
ylavic [Mon, 10 Dec 2018 20:47:43 +0000 (21:47 +0100)]
Add less than operator to Pointer.

Allows to sort pointers in (std-)containers and/or index by them.