1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 12:41:15 +02:00

Fix most DoxyGen warnings

Helps with #11841.
This commit is contained in:
Eelco Dolstra 2024-11-12 15:31:37 +01:00
parent 2e2198fd91
commit 02f0294be0
41 changed files with 161 additions and 124 deletions

View file

@ -91,12 +91,14 @@ namespace nlohmann {
* round trip. We do that with a static assert.
*/
template<typename T>
struct adl_serializer<std::optional<T>> {
struct adl_serializer<std::optional<T>>
{
/**
* @brief Convert a JSON type to an `optional<T>` treating
* `null` as `std::nullopt`.
*/
static void from_json(const json & json, std::optional<T> & t) {
static void from_json(const json & json, std::optional<T> & t)
{
static_assert(
nix::json_avoids_null<T>::value,
"null is already in use for underlying type's JSON");
@ -109,7 +111,8 @@ struct adl_serializer<std::optional<T>> {
* @brief Convert an optional type to a JSON type treating `std::nullopt`
* as `null`.
*/
static void to_json(json & json, const std::optional<T> & t) {
static void to_json(json & json, const std::optional<T> & t)
{
static_assert(
nix::json_avoids_null<T>::value,
"null is already in use for underlying type's JSON");