mirror of
https://github.com/nlohmann/json.git
synced 2026-11-15 16:16:42 +00:00
Compare commits
9
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b8fd578873 | ||
|
|
711093e7af | ||
|
|
7074088d4f | ||
|
|
394058b752 | ||
|
|
551a7f2a23 | ||
|
|
97b07d6f15 | ||
|
|
e4449fd3f0 | ||
|
|
5fddf930db | ||
|
|
6a023f469c |
No files matched your search
@@ -11,10 +11,12 @@ template<typename ScalarType>
|
||||
bool operator==(ScalarType lhs, const const_reference rhs) noexcept(/* see below */); // (2)
|
||||
|
||||
// since C++20
|
||||
bool operator==(const_reference rhs) const noexcept; // (1)
|
||||
class basic_json {
|
||||
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,10 +2,12 @@
|
||||
|
||||
```cpp
|
||||
// since C++20
|
||||
std::partial_ordering operator<=>(const_reference rhs) const noexcept; // (1)
|
||||
class basic_json {
|
||||
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,11 +18,13 @@ bool operator==(
|
||||
const json_pointer<RefStringTypeRhs>& rhs); // (2)
|
||||
|
||||
// since C++20
|
||||
template<typename RefStringTypeRhs>
|
||||
bool operator==(
|
||||
const json_pointer<RefStringTypeRhs>& rhs) const noexcept; // (1)
|
||||
class json_pointer {
|
||||
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,8 +2,10 @@
|
||||
|
||||
```cpp
|
||||
// since C++20
|
||||
template<typename RefStringTypeRhs>
|
||||
std::strong_ordering operator<=>(const json_pointer<RefStringTypeRhs>& rhs) const noexcept; // *NOPAD*
|
||||
class json_pointer {
|
||||
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
|
||||
|
||||
@@ -986,8 +986,8 @@ void convert_float_locale_aware(StringType& token, std::size_t decimal_point_pos
|
||||
{
|
||||
std::string buffer(token.data(), token.size());
|
||||
buffer.replace(decimal_point_position, 1, decimal_point);
|
||||
strtof_by_type(value, buffer.data(), &endptr);
|
||||
complete = endptr == buffer.data() + buffer.size();
|
||||
strtof_by_type(value, buffer.c_str(), &endptr);
|
||||
complete = endptr == buffer.c_str() + buffer.size();
|
||||
}
|
||||
|
||||
if (JSON_HEDLEY_LIKELY(complete))
|
||||
|
||||
Generated
+2
-2
@@ -10432,8 +10432,8 @@ void convert_float_locale_aware(StringType& token, std::size_t decimal_point_pos
|
||||
{
|
||||
std::string buffer(token.data(), token.size());
|
||||
buffer.replace(decimal_point_position, 1, decimal_point);
|
||||
strtof_by_type(value, buffer.data(), &endptr);
|
||||
complete = endptr == buffer.data() + buffer.size();
|
||||
strtof_by_type(value, buffer.c_str(), &endptr);
|
||||
complete = endptr == buffer.c_str() + buffer.size();
|
||||
}
|
||||
|
||||
if (JSON_HEDLEY_LIKELY(complete))
|
||||
|
||||
Reference in new issue
Block a user