* Support for both in-source and out-of-source builds
* Set library version to 0.12 to map Debian package
* Add separate options to build tests, examples and documentation
* Add pkgconfig lookup support (if installed with `make install`)
* Add CMake lookup support (if isntalled with `make install`)
* Add Google Test Source lookup
* Add CTest support for running tests (use `make test` or `ctest -V`)
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.
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.
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.
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.
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.
MemoryStream::Peek() did not return '\0' if src_ == end_, but Peek() == '\0' is
used in parsing in the GenericReader. Without this change, parsing with
MemoryStream as the InputStream could result in a segmentation fault.