mirror of
https://github.com/nlohmann/json.git
synced 2026-10-13 17:57:14 +00:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e0c7f8a215 | ||
|
|
6bb7e63452 |
No files matched your search
@@ -11,12 +11,10 @@ template<typename ScalarType>
|
||||
bool operator==(ScalarType lhs, const const_reference rhs) noexcept(/* see below */); // (2)
|
||||
|
||||
// since C++20
|
||||
class basic_json {
|
||||
bool operator==(const_reference rhs) const noexcept; // (1)
|
||||
bool operator==(const_reference rhs) const noexcept; // (1)
|
||||
|
||||
template<typename ScalarType>
|
||||
bool operator==(ScalarType rhs) const noexcept(/* see below */); // (2)
|
||||
};
|
||||
template<typename ScalarType>
|
||||
bool operator==(ScalarType rhs) const noexcept(/* see below */); // (2)
|
||||
```
|
||||
|
||||
1. Compares two JSON values for equality according to the following rules:
|
||||
|
||||
@@ -2,12 +2,10 @@
|
||||
|
||||
```cpp
|
||||
// since C++20
|
||||
class basic_json {
|
||||
std::partial_ordering operator<=>(const_reference rhs) const noexcept; // (1)
|
||||
std::partial_ordering operator<=>(const_reference rhs) const noexcept; // (1)
|
||||
|
||||
template<typename ScalarType>
|
||||
std::partial_ordering operator<=>(const ScalarType rhs) const noexcept(/* see below */); // (2)
|
||||
};
|
||||
template<typename ScalarType>
|
||||
std::partial_ordering operator<=>(const ScalarType rhs) const noexcept(/* see below */); // (2)
|
||||
```
|
||||
|
||||
1. 3-way compares two JSON values producing a result of type `std::partial_ordering` according to the following rules:
|
||||
|
||||
@@ -18,13 +18,11 @@ bool operator==(
|
||||
const json_pointer<RefStringTypeRhs>& rhs); // (2)
|
||||
|
||||
// since C++20
|
||||
class json_pointer {
|
||||
template<typename RefStringTypeRhs>
|
||||
bool operator==(
|
||||
const json_pointer<RefStringTypeRhs>& rhs) const noexcept; // (1)
|
||||
template<typename RefStringTypeRhs>
|
||||
bool operator==(
|
||||
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.
|
||||
|
||||
@@ -2,10 +2,8 @@
|
||||
|
||||
```cpp
|
||||
// since C++20
|
||||
class json_pointer {
|
||||
template<typename RefStringTypeRhs>
|
||||
std::strong_ordering operator<=>(const json_pointer<RefStringTypeRhs>& rhs) const noexcept; // *NOPAD*
|
||||
};
|
||||
template<typename RefStringTypeRhs>
|
||||
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
|
||||
|
||||
Reference in new issue
Block a user