1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-29 23:01:16 +03:00

Deprecate json_pointer/string_t comparisons (#3684)

* Deprecate json_pointer/string_t comparisons

* Update documentation
This commit is contained in:
Florian Albrechtskirchinger
2022-08-07 22:26:59 +02:00
committed by GitHub
parent e1a3fb74ba
commit a92ccafd2c
4 changed files with 22 additions and 2 deletions

View File

@ -14518,6 +14518,7 @@ class json_pointer
/// @brief compares JSON pointer and string for equality
/// @sa https://json.nlohmann.me/api/json_pointer/operator_eq/
JSON_HEDLEY_DEPRECATED_FOR(3.11.2, operator==(json_pointer))
bool operator==(const string_t& rhs) const
{
return *this == json_pointer(rhs);
@ -14595,6 +14596,7 @@ inline bool operator==(const json_pointer<RefStringTypeLhs>& lhs,
template<typename RefStringTypeLhs,
typename StringType = typename json_pointer<RefStringTypeLhs>::string_t>
JSON_HEDLEY_DEPRECATED_FOR(3.11.2, operator==(json_pointer, json_pointer))
inline bool operator==(const json_pointer<RefStringTypeLhs>& lhs,
const StringType& rhs)
{
@ -14603,6 +14605,7 @@ inline bool operator==(const json_pointer<RefStringTypeLhs>& lhs,
template<typename RefStringTypeRhs,
typename StringType = typename json_pointer<RefStringTypeRhs>::string_t>
JSON_HEDLEY_DEPRECATED_FOR(3.11.2, operator==(json_pointer, json_pointer))
inline bool operator==(const StringType& lhs,
const json_pointer<RefStringTypeRhs>& rhs)
{
@ -14618,6 +14621,7 @@ inline bool operator!=(const json_pointer<RefStringTypeLhs>& lhs,
template<typename RefStringTypeLhs,
typename StringType = typename json_pointer<RefStringTypeLhs>::string_t>
JSON_HEDLEY_DEPRECATED_FOR(3.11.2, operator!=(json_pointer, json_pointer))
inline bool operator!=(const json_pointer<RefStringTypeLhs>& lhs,
const StringType& rhs)
{
@ -14626,6 +14630,7 @@ inline bool operator!=(const json_pointer<RefStringTypeLhs>& lhs,
template<typename RefStringTypeRhs,
typename StringType = typename json_pointer<RefStringTypeRhs>::string_t>
JSON_HEDLEY_DEPRECATED_FOR(3.11.2, operator!=(json_pointer, json_pointer))
inline bool operator!=(const StringType& lhs,
const json_pointer<RefStringTypeRhs>& rhs)
{