mirror of
https://github.com/nlohmann/json.git
synced 2026-10-14 10:17:12 +00:00
Drop the class wrapper from the json_pointer comparison signatures too
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
2 files changed
+6
-10
No files matched your search
@@ -18,13 +18,11 @@ bool operator==(
|
|||||||
const json_pointer<RefStringTypeRhs>& rhs); // (2)
|
const json_pointer<RefStringTypeRhs>& rhs); // (2)
|
||||||
|
|
||||||
// since C++20
|
// since C++20
|
||||||
class json_pointer {
|
template<typename RefStringTypeRhs>
|
||||||
template<typename RefStringTypeRhs>
|
bool operator==(
|
||||||
bool operator==(
|
const json_pointer<RefStringTypeRhs>& rhs) const noexcept; // (1)
|
||||||
const json_pointer<RefStringTypeRhs>& rhs) const noexcept; // (1)
|
|
||||||
|
|
||||||
bool operator==(const string_t& rhs) const; // (2)
|
bool operator==(const string_t& rhs) const; // (2)
|
||||||
};
|
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Compares two JSON pointers for equality by comparing their reference tokens.
|
1. Compares two JSON pointers for equality by comparing their reference tokens.
|
||||||
|
|||||||
@@ -2,10 +2,8 @@
|
|||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
// since C++20
|
// since C++20
|
||||||
class json_pointer {
|
template<typename RefStringTypeRhs>
|
||||||
template<typename RefStringTypeRhs>
|
std::strong_ordering operator<=>(const json_pointer<RefStringTypeRhs>& rhs) const noexcept; // *NOPAD*
|
||||||
std::strong_ordering operator<=>(const json_pointer<RefStringTypeRhs>& rhs) const noexcept; // *NOPAD*
|
|
||||||
};
|
|
||||||
```
|
```
|
||||||
|
|
||||||
3-way compares two JSON pointers by lexicographically comparing their sequences of reference tokens: corresponding
|
3-way compares two JSON pointers by lexicographically comparing their sequences of reference tokens: corresponding
|
||||||
|
|||||||
Reference in new issue
Block a user