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.
This commit is contained in:
parent
38889835ce
commit
a9add7bd2a
@ -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)
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user