Compare commits

...
Author SHA1 Message Date
Niels Lohmann 94d8b5a248 Do not self-host shields.io badges in the documentation
The privacy plugin downloads img.shields.io badges at build time; when
shields.io times out, mkdocs build --strict aborts and the
ci_test_build_documentation job fails until it is restarted. Exclude
the host like repology.org; the version badges stay current this way.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
2026-10-14 08:37:36 +02:00
Niels Lohmann 7461a199b5 Drop the class wrapper from the C++20 comparison operator signatures in the docs (#5814)
* Drop the class wrapper from the C++20 comparison operator signatures in the docs

The signature boxes of operator<=> and the C++20 half of operator== wrapped
the member declarations in an incomplete "class basic_json { ... };". The
trailing const already marks them as members, and no other page uses such a
wrapper.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

* Drop the class wrapper from the json_pointer comparison signatures too

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

---------

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
2026-10-13 20:06:14 +02:00
5 changed files with 16 additions and 20 deletions

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
+4
View File
@@ -453,8 +453,12 @@ plugins:
# package badges (the fetch fails, then reading the missing cache entry
# raises FileNotFoundError). Readers' browsers are served normally, so
# leave these badges as external references instead of self-hosting them.
# The same goes for img.shields.io, whose version badges time out from
# time to time (strict mode turns the failed download into an error) and
# would go stale between builds if they were self-hosted anyway.
assets_exclude:
- repology.org/*
- img.shields.io/*
- llmstxt:
markdown_description: >
JSON for Modern C++ is a C++11 header-only library implementing a JSON