Commit a9add7bd authored by Philipp A. Hartmann's avatar Philipp A. Hartmann

GenericValue: add non-template overload for operator!=

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.
parent 38889835
...@@ -685,6 +685,11 @@ public: ...@@ -685,6 +685,11 @@ public:
*/ */
template <typename T> RAPIDJSON_DISABLEIF_RETURN(internal::IsPointer<T>, bool) operator==(const T& rhs) const { return *this == GenericValue(rhs); } template <typename T> RAPIDJSON_DISABLEIF_RETURN(internal::IsPointer<T>, bool) operator==(const T& rhs) const { return *this == GenericValue(rhs); }
//! Not-equal-to operator
/*! \return !(*this == rhs)
*/
bool operator!=(const GenericValue& rhs) const { return !(*this == rhs); }
//! Not-equal-to operator with arbitrary types //! Not-equal-to operator with arbitrary types
/*! \return !(*this == rhs) /*! \return !(*this == rhs)
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment