654 Commits

Author SHA1 Message Date
Philipp A. Hartmann
c88cc331d5 DiyFp: avoid shadowing (closes #195) 2014-11-17 13:31:24 +01:00
Philipp A. Hartmann
6b69662ce8 Writer: declare constructors as explicit
Avoids implicit conversion from an `OutputStream` (or an allocator pointer)
to a `Writer` instance.
2014-11-17 13:27:54 +01:00
Philipp A. Hartmann
c35bbe54d9 Writer: fix documentation of stackAllocator param (closes #196) 2014-11-17 13:26:49 +01:00
Milo Yip
8acaaa757c Merge pull request #178 from spacewander/patch-2
Use absolute path for the link to examples
2014-11-17 09:53:49 +08:00
Milo Yip
8d4405cf63 Merge pull request #193 from pah/feature/custom-namespace
Allow customization of RapidJSON namespace
2014-11-07 11:37:49 +08:00
Philipp A. Hartmann
a0f9de61a9 namespacetest: add symbol check to .travis.yml 2014-11-06 21:11:58 +01:00
Philipp A. Hartmann
7dc9b18f54 namespacetest.cpp: add test for separate namespace 2014-11-06 20:54:46 +01:00
Philipp A. Hartmann
549dcb755d *.h: move to namespace macros 2014-11-06 20:52:49 +01:00
Philipp A. Hartmann
55757ff420 Doxyfile: expand RapidJSON namespace macros 2014-11-06 20:52:49 +01:00
Philipp A. Hartmann
5d9125f51c add RAPIDJSON_NAMESPACE + _BEGIN, _END 2014-11-06 20:52:49 +01:00
Milo Yip
8307f0f4c9 Merge pull request #189 from drewnoakes/feature/static_assert
Document traits of types using <type_traits> and static_assert in tests
2014-10-31 19:47:27 +08:00
Drew Noakes
6aa664eeef Document traits of types using <type_traits> and static_assert in tests.
The tests state the current traits of types Document, Value and
StringBuffer. There are slight differences between them. It seems like a
good idea to extend this approach across more types, and to review the
expected traits across the board.
2014-10-31 11:00:57 +00:00
Milo Yip
d6c1c57159 Merge pull request #188 from pah/feature/lazy-alloc-allocators
MemoryPoolAllocator, Stack: lazily allocate Allocators
2014-10-31 09:34:27 +08:00
Milo Yip
96f979a0c4 Merge pull request #187 from pah/fixes/sign-compare
DocumentMove tests: compiler error due to -Wsign-compare
2014-10-31 09:33:32 +08:00
Milo Yip
1d3070fbc2 Merge pull request #184 from drewnoakes/master
Add unit tests for StringBuffer
2014-10-31 09:32:56 +08:00
Philipp A. Hartmann
1a31767dcf DocumentMove tests: compiler error due to -Wsign-compare
On GCC 4.9, the documenttest.cpp fails to compile in C++11 mode,
as the MoveConstructor/Assignment tests contain left-over
comparisons between signed and unsigned expressions.
2014-10-30 19:23:57 +01:00
Philipp A. Hartmann
e8f5d9f8ef MemoryPoolAllocator, Stack: lazily allocate Allocators
In order to make the constructors more efficient, especially
in the context of C++11 move semantics, the (dynamic) allocations
in MemoryPoolAllocator and Stack should be performed lazily.

Move the allocations to the first use of the allocator in both
classes.
2014-10-30 18:40:58 +01:00
Philipp A. Hartmann
d0c283254b Stack<>: add _ suffix to member ownAllocator_
For consistency, all member variables should follow the same pattern.
2014-10-30 18:21:27 +01:00
Drew Noakes
0bfd0a5205 Add unit tests for StringBuffer. 2014-10-30 17:08:45 +00:00
Milo Yip
4fa43bd465 Merge pull request #183 from pah/feature/wrapped-new-delete
Add customization macros for global new/delete
2014-10-30 22:02:29 +08:00
Philipp A. Hartmann
c557b230a6 Add customization macros for global new/delete
As mentioned in #181, some environments may require adaptations to
the internal calls to the global `new`/`delete` operators, like
adding explicit `NULL` checks to `delete.

This patch adds two new macros
 * RAPIDJSON_NEW(x)
 * RAPIDJSON_DELETE(x)
to allow user-defined expressions in these cases.

This fixes #181 in an alternative manner.
2014-10-30 11:20:46 +01:00
Milo Yip
dea1cdca62 Merge pull request #180 from pah/cleanup/doxygen-thirdparty
Drop thirdparty libraries and minor cleanups
2014-10-29 14:59:35 +08:00
Philipp A. Hartmann
aadcdb0252 performance.md: reference new benchmark suite 2014-10-28 19:36:15 +01:00
Philipp A. Hartmann
20bab938b7 Drop thirdparty JSON implementations/performance tests
With the implementation of the more elaborate benchmarking
suite at https://github.com/miloyip/nativejson-benchmark,
the thirdparty performance tests are superseded.
2014-10-28 19:35:36 +01:00
Philipp A. Hartmann
288db9c790 drop unneeded doc/diagram/.gitignore 2014-10-28 15:11:28 +01:00
Philipp A. Hartmann
c36318ca1f .gitignore: ignore Doxygen database 2014-10-28 15:11:28 +01:00
Milo Yip
d8271f7984 Merge pull request #179 from spl/remove-member-docs
Clarify documentation on RemoveMember, EraseMember ordering
2014-10-27 22:16:57 +08:00
Sean Leather
716907b9fb Clarify documentation on RemoveMember, EraseMember ordering 2014-10-27 15:04:26 +02:00
spacewander
01e78d7a0a Use absolute path for the link to examples
So the example link in documentation will always point to correct place.
2014-10-27 16:26:08 +08:00
Milo Yip
8fc0e57926 Merge pull request #177 from spl/use-deprecated
Use 'deprecated' instead of 'depreciated'
2014-10-27 14:53:29 +08:00
Milo Yip
1950efd676 Merge pull request #173 from ecorm/issue123movesupport
Issue123movesupport
2014-10-27 14:52:28 +08:00
Sean Leather
32525a5d5e Use 'deprecated' instead of 'depreciated' 2014-10-26 14:51:35 +02:00
ecorm
b0328d2d3b GenericDocument move-assignment now uses std::foward to move-assign the base class. 2014-10-24 15:25:27 -03:00
ecorm
20a9cd2810 Merge branch 'master' into issue123movesupport 2014-10-24 14:09:30 -03:00
ecorm
fd12dcb3db Added MemoryPoolAllocator to GenericDocument moveunit tests. Added comment in GenericDocument move assignment operator explaining why the static_cast is needed to move the base class. 2014-10-24 14:05:32 -03:00
Milo Yip
c1a57c37ff Merge pull request #175 from pah/cleanup/index-operator
GenericValue: improve documentation for operator[]
2014-10-24 21:23:49 +08:00
Philipp A. Hartmann
6bd5ecb08c GenericValue: improve documentation for operator[] 2014-10-24 14:45:48 +02:00
Milo Yip
838d5130d3 Merge pull request #174 from pah/cleanup/index-operator
GenericValue: improve operator[] disambiguation
2014-10-24 20:08:04 +08:00
Philipp A. Hartmann
e8445e0bbc GenericValue: improve operator[] disambiguation
In the original disambiguation fix for `GenericValue::operator[]` (#170),
the documentation has been missing, which led to quite badly rendered
Doxygen pages.

During a cleanup, I've realized that a much simpler disambiguation is
possible:

````cpp
  GenericValue& operator[](SizeType idx); // array
  template <typename T>
  GenericValue& operator[](T* name);      // object
````

This approach works, as non-template functions are preferred over
template functions.

In order to improve the error messages, the pointer type is restricted
to `(const) Ch`.

Update `tutorial.md` to drop the ambiguity warning.
2014-10-24 13:55:26 +02:00
ecorm
cb33f910c3 Merge branch 'master' into issue123movesupport 2014-10-24 03:11:34 -03:00
ecorm
02f3b00ee6 Implemented C++11 move semantics for GenericDocument 2014-10-24 02:51:17 -03:00
Milo Yip
5ccc663479 Merge pull request #172 from lichray/patch-1
Demonstrate CRTP in SAX example
2014-10-24 10:21:36 +08:00
Milo Yip
a6b444dec4 Merge pull request #170 from lichray/disambi_indexing
Disambiguate GenericValue's [0] and ["string"]
2014-10-24 10:21:03 +08:00
Zhihao Yuan
c6a985c503 Demonstrate CRTP in SAX example
Closes: https://github.com/miloyip/rapidjson/issues/142
2014-10-23 21:55:25 -04:00
Zhihao Yuan
7303d92990 Disambiguate GenericValue's [0] and ["string"] 2014-10-23 21:50:39 -04:00
Zhihao Yuan
0d90bcc709 No implicit conversion from Type to GenericValue 2014-10-23 21:50:39 -04:00
Milo Yip
11f20c4faf Merge pull request #171 from pah/fixes/travis-valgrind-bug
.travis.yml: avoid Valgrind bug with '-march=native'
2014-10-24 09:41:59 +08:00
Philipp A. Hartmann
48a9854e33 .travis.yml: avoid Valgrind bug with '-march=native' 2014-10-23 19:11:01 +02:00
Milo Yip
89fa782240 Merge pull request #166 from spl/fix-memorystream-peek
Fix MemoryStream::Peek() and add test for fix
2014-10-23 12:46:33 +08:00
Milo Yip
a58559f1cb Merge pull request #163 from spl/march-native
Use -march=native for platform-specific optimizations
2014-10-23 12:46:21 +08:00