Before applying the simplifications in ed282b814, the SFINAE check for the
GenericValue(bool) constructor has been broken in MSVC 2005. Add a static
assert as a safe-guard against future reappearance of this problem.
In order to match GenericValue and its derived classes for the
SFINAE-implementation of some of the operators/functions, this
meta-function matches all types equal to or derived from a given
class. See std::is_base_of<B,D> available in C++11.
Define RAPIDJSON_HAS_CXX_TYPETRAITS to use the C++11 implementation.
Some (older) compilers have problems with compile-time constants.
This commit simplifies the implementation of the helper classes
in order to improve compiler support, especially be removing the
need of partial template specialisation.
No functional changes.
Prepare equalto_operator tests to test comparisons between
* GenericValue and GenericDocument
* GenericValue with different SourceAllocator types
Both combinations currently fail due to ambiguities with the
templated operators on several compilers.
As reported in #113, recent versions of Clang complain about
ambiguous overloads for some comparison operator instantiations,
especially if the deduced template type is a GenericValue.
Add an explicit, non-templated version for now (which is a better
match).
This only solves part of the problem, as comparisons between
* GenericValue & GenericDocument
* GenericValue with different SourceAllocator types
will still cause ambiguities.
Some users may want to use RapidJSON with std::string objects. This commits
adds an (opt-in) feature to include some basic support. The implementation
uses std::basic_string<Ch> as generic string type.
Support currently covers:
* construction
* comparison
No special APIs for AddMember or PushBack have been added, as std::string
most probably requires copying (or an explicit StringRef() call).
By restructuring the call forwarding of the various operator== and
operator!= overloads, new overloads can be added by simply adding an
additional member operator==.
Additionally, the "Ch*" overloads are dropped in favour of an SFINAE
version that removes the pointer variants from matching the templated
operator== (see also operator=).
As Ubuntu supports running 32-bit executables based on its multiarch
setup, we can enable the tests on 32-bit configurations as well.
Currently, valgrind fails for 32-bit executables on the 64-bit host.
This requires some more investigation.