This commit is contained in:
Andreas C. Osowski 2018-08-25 14:38:49 +00:00 committed by GitHub
commit 1c8094d395
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 8 deletions

View File

@ -5542,8 +5542,10 @@ class basic_json
@brief comparison: equal @brief comparison: equal
@copydoc operator==(const_reference, const_reference) @copydoc operator==(const_reference, const_reference)
*/ */
template<typename ScalarType, typename std::enable_if< template < typename ScalarType, typename std::enable_if <
std::is_scalar<ScalarType>::value, int>::type = 0> std::is_scalar<ScalarType>::value, int >::type = 0,
typename std::enable_if <
std::is_same<std::nullptr_t, std::remove_cv<ScalarType>>::value, int >::type = 0 >
friend bool operator==(const_reference lhs, const ScalarType rhs) noexcept friend bool operator==(const_reference lhs, const ScalarType rhs) noexcept
{ {
return (lhs == basic_json(rhs)); return (lhs == basic_json(rhs));
@ -5553,8 +5555,10 @@ class basic_json
@brief comparison: equal @brief comparison: equal
@copydoc operator==(const_reference, const_reference) @copydoc operator==(const_reference, const_reference)
*/ */
template<typename ScalarType, typename std::enable_if< template < typename ScalarType, typename std::enable_if <
std::is_scalar<ScalarType>::value, int>::type = 0> std::is_scalar<ScalarType>::value, int >::type = 0,
typename std::enable_if <
std::is_same<std::nullptr_t, std::remove_cv<ScalarType>>::value, int >::type = 0 >
friend bool operator==(const ScalarType lhs, const_reference rhs) noexcept friend bool operator==(const ScalarType lhs, const_reference rhs) noexcept
{ {
return (basic_json(lhs) == rhs); return (basic_json(lhs) == rhs);

View File

@ -16649,8 +16649,10 @@ class basic_json
@brief comparison: equal @brief comparison: equal
@copydoc operator==(const_reference, const_reference) @copydoc operator==(const_reference, const_reference)
*/ */
template<typename ScalarType, typename std::enable_if< template < typename ScalarType, typename std::enable_if <
std::is_scalar<ScalarType>::value, int>::type = 0> std::is_scalar<ScalarType>::value, int >::type = 0,
typename std::enable_if <
!std::is_same<std::nullptr_t, std::remove_cv<ScalarType>>::value, int >::type = 0 >
friend bool operator==(const_reference lhs, const ScalarType rhs) noexcept friend bool operator==(const_reference lhs, const ScalarType rhs) noexcept
{ {
return (lhs == basic_json(rhs)); return (lhs == basic_json(rhs));
@ -16660,8 +16662,10 @@ class basic_json
@brief comparison: equal @brief comparison: equal
@copydoc operator==(const_reference, const_reference) @copydoc operator==(const_reference, const_reference)
*/ */
template<typename ScalarType, typename std::enable_if< template < typename ScalarType, typename std::enable_if <
std::is_scalar<ScalarType>::value, int>::type = 0> std::is_scalar<ScalarType>::value, int >::type = 0,
typename std::enable_if <
!std::is_same<std::nullptr_t, std::remove_cv<ScalarType>>::value, int >::type = 0 >
friend bool operator==(const ScalarType lhs, const_reference rhs) noexcept friend bool operator==(const ScalarType lhs, const_reference rhs) noexcept
{ {
return (basic_json(lhs) == rhs); return (basic_json(lhs) == rhs);