Skip to content

Commit 3884172

Browse files
committed
build: Updated dependencies
1 parent 7fb8c83 commit 3884172

48 files changed

Lines changed: 4155 additions & 2627 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

external/nlohmann_json/include/nlohmann/adl_serializer.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// __ _____ _____ _____
22
// __| | __| | | | JSON for Modern C++
3-
// | | |__ | | | | | | version 3.11.3
3+
// | | |__ | | | | | | version 3.12.0
44
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
55
//
6-
// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me>
6+
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
77
// SPDX-License-Identifier: MIT
88

99
#pragma once

external/nlohmann_json/include/nlohmann/byte_container_with_subtype.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// __ _____ _____ _____
22
// __| | __| | | | JSON for Modern C++
3-
// | | |__ | | | | | | version 3.11.3
3+
// | | |__ | | | | | | version 3.12.0
44
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
55
//
6-
// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me>
6+
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
77
// SPDX-License-Identifier: MIT
88

99
#pragma once

external/nlohmann_json/include/nlohmann/detail/abi_macros.hpp

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// __ _____ _____ _____
22
// __| | __| | | | JSON for Modern C++
3-
// | | |__ | | | | | | version 3.11.3
3+
// | | |__ | | | | | | version 3.12.0
44
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
55
//
6-
// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me>
6+
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
77
// SPDX-License-Identifier: MIT
88

99
#pragma once
@@ -12,20 +12,24 @@
1212

1313
#ifndef JSON_SKIP_LIBRARY_VERSION_CHECK
1414
#if defined(NLOHMANN_JSON_VERSION_MAJOR) && defined(NLOHMANN_JSON_VERSION_MINOR) && defined(NLOHMANN_JSON_VERSION_PATCH)
15-
#if NLOHMANN_JSON_VERSION_MAJOR != 3 || NLOHMANN_JSON_VERSION_MINOR != 11 || NLOHMANN_JSON_VERSION_PATCH != 3
15+
#if NLOHMANN_JSON_VERSION_MAJOR != 3 || NLOHMANN_JSON_VERSION_MINOR != 12 || NLOHMANN_JSON_VERSION_PATCH != 0
1616
#warning "Already included a different version of the library!"
1717
#endif
1818
#endif
1919
#endif
2020

2121
#define NLOHMANN_JSON_VERSION_MAJOR 3 // NOLINT(modernize-macro-to-enum)
22-
#define NLOHMANN_JSON_VERSION_MINOR 11 // NOLINT(modernize-macro-to-enum)
23-
#define NLOHMANN_JSON_VERSION_PATCH 3 // NOLINT(modernize-macro-to-enum)
22+
#define NLOHMANN_JSON_VERSION_MINOR 12 // NOLINT(modernize-macro-to-enum)
23+
#define NLOHMANN_JSON_VERSION_PATCH 0 // NOLINT(modernize-macro-to-enum)
2424

2525
#ifndef JSON_DIAGNOSTICS
2626
#define JSON_DIAGNOSTICS 0
2727
#endif
2828

29+
#ifndef JSON_DIAGNOSTIC_POSITIONS
30+
#define JSON_DIAGNOSTIC_POSITIONS 0
31+
#endif
32+
2933
#ifndef JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON
3034
#define JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON 0
3135
#endif
@@ -36,6 +40,12 @@
3640
#define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS
3741
#endif
3842

43+
#if JSON_DIAGNOSTIC_POSITIONS
44+
#define NLOHMANN_JSON_ABI_TAG_DIAGNOSTIC_POSITIONS _dp
45+
#else
46+
#define NLOHMANN_JSON_ABI_TAG_DIAGNOSTIC_POSITIONS
47+
#endif
48+
3949
#if JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON
4050
#define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON _ldvcmp
4151
#else
@@ -47,14 +57,15 @@
4757
#endif
4858

4959
// Construct the namespace ABI tags component
50-
#define NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b) json_abi ## a ## b
51-
#define NLOHMANN_JSON_ABI_TAGS_CONCAT(a, b) \
52-
NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b)
60+
#define NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b, c) json_abi ## a ## b ## c
61+
#define NLOHMANN_JSON_ABI_TAGS_CONCAT(a, b, c) \
62+
NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b, c)
5363

5464
#define NLOHMANN_JSON_ABI_TAGS \
5565
NLOHMANN_JSON_ABI_TAGS_CONCAT( \
5666
NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS, \
57-
NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON)
67+
NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON, \
68+
NLOHMANN_JSON_ABI_TAG_DIAGNOSTIC_POSITIONS)
5869

5970
// Construct the namespace version component
6071
#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) \

external/nlohmann_json/include/nlohmann/detail/conversions/from_json.hpp

Lines changed: 84 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// __ _____ _____ _____
22
// __| | __| | | | JSON for Modern C++
3-
// | | |__ | | | | | | version 3.11.3
3+
// | | |__ | | | | | | version 3.12.0
44
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
55
//
6-
// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me>
6+
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
77
// SPDX-License-Identifier: MIT
88

99
#pragma once
@@ -13,6 +13,9 @@
1313
#include <forward_list> // forward_list
1414
#include <iterator> // inserter, front_inserter, end
1515
#include <map> // map
16+
#ifdef JSON_HAS_CPP_17
17+
#include <optional> // optional
18+
#endif
1619
#include <string> // string
1720
#include <tuple> // tuple, make_tuple
1821
#include <type_traits> // is_arithmetic, is_same, is_enum, underlying_type, is_convertible
@@ -43,6 +46,24 @@ inline void from_json(const BasicJsonType& j, typename std::nullptr_t& n)
4346
n = nullptr;
4447
}
4548

49+
#ifdef JSON_HAS_CPP_17
50+
#ifndef JSON_USE_IMPLICIT_CONVERSIONS
51+
template<typename BasicJsonType, typename T>
52+
void from_json(const BasicJsonType& j, std::optional<T>& opt)
53+
{
54+
if (j.is_null())
55+
{
56+
opt = std::nullopt;
57+
}
58+
else
59+
{
60+
opt.emplace(j.template get<T>());
61+
}
62+
}
63+
64+
#endif // JSON_USE_IMPLICIT_CONVERSIONS
65+
#endif // JSON_HAS_CPP_17
66+
4667
// overloads for basic_json template parameters
4768
template < typename BasicJsonType, typename ArithmeticType,
4869
enable_if_t < std::is_arithmetic<ArithmeticType>::value&&
@@ -190,6 +211,54 @@ auto from_json(const BasicJsonType& j, T (&arr)[N]) // NOLINT(cppcoreguidelines
190211
}
191212
}
192213

214+
template<typename BasicJsonType, typename T, std::size_t N1, std::size_t N2>
215+
auto from_json(const BasicJsonType& j, T (&arr)[N1][N2]) // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays)
216+
-> decltype(j.template get<T>(), void())
217+
{
218+
for (std::size_t i1 = 0; i1 < N1; ++i1)
219+
{
220+
for (std::size_t i2 = 0; i2 < N2; ++i2)
221+
{
222+
arr[i1][i2] = j.at(i1).at(i2).template get<T>();
223+
}
224+
}
225+
}
226+
227+
template<typename BasicJsonType, typename T, std::size_t N1, std::size_t N2, std::size_t N3>
228+
auto from_json(const BasicJsonType& j, T (&arr)[N1][N2][N3]) // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays)
229+
-> decltype(j.template get<T>(), void())
230+
{
231+
for (std::size_t i1 = 0; i1 < N1; ++i1)
232+
{
233+
for (std::size_t i2 = 0; i2 < N2; ++i2)
234+
{
235+
for (std::size_t i3 = 0; i3 < N3; ++i3)
236+
{
237+
arr[i1][i2][i3] = j.at(i1).at(i2).at(i3).template get<T>();
238+
}
239+
}
240+
}
241+
}
242+
243+
template<typename BasicJsonType, typename T, std::size_t N1, std::size_t N2, std::size_t N3, std::size_t N4>
244+
auto from_json(const BasicJsonType& j, T (&arr)[N1][N2][N3][N4]) // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays)
245+
-> decltype(j.template get<T>(), void())
246+
{
247+
for (std::size_t i1 = 0; i1 < N1; ++i1)
248+
{
249+
for (std::size_t i2 = 0; i2 < N2; ++i2)
250+
{
251+
for (std::size_t i3 = 0; i3 < N3; ++i3)
252+
{
253+
for (std::size_t i4 = 0; i4 < N4; ++i4)
254+
{
255+
arr[i1][i2][i3][i4] = j.at(i1).at(i2).at(i3).at(i4).template get<T>();
256+
}
257+
}
258+
}
259+
}
260+
}
261+
193262
template<typename BasicJsonType>
194263
inline void from_json_array_impl(const BasicJsonType& j, typename BasicJsonType::array_t& arr, priority_tag<3> /*unused*/)
195264
{
@@ -275,7 +344,7 @@ void())
275344

276345
template < typename BasicJsonType, typename T, std::size_t... Idx >
277346
std::array<T, sizeof...(Idx)> from_json_inplace_array_impl(BasicJsonType&& j,
278-
identity_tag<std::array<T, sizeof...(Idx)>> /*unused*/, index_sequence<Idx...> /*unused*/)
347+
identity_tag<std::array<T, sizeof...(Idx)>> /*unused*/, index_sequence<Idx...> /*unused*/)
279348
{
280349
return { { std::forward<BasicJsonType>(j).at(Idx).template get<T>()... } };
281350
}
@@ -379,6 +448,12 @@ std::tuple<Args...> from_json_tuple_impl_base(BasicJsonType&& j, index_sequence<
379448
return std::make_tuple(std::forward<BasicJsonType>(j).at(Idx).template get<Args>()...);
380449
}
381450

451+
template<typename BasicJsonType>
452+
std::tuple<> from_json_tuple_impl_base(BasicJsonType& /*unused*/, index_sequence<> /*unused*/)
453+
{
454+
return {};
455+
}
456+
382457
template < typename BasicJsonType, class A1, class A2 >
383458
std::pair<A1, A2> from_json_tuple_impl(BasicJsonType&& j, identity_tag<std::pair<A1, A2>> /*unused*/, priority_tag<0> /*unused*/)
384459
{
@@ -464,7 +539,12 @@ inline void from_json(const BasicJsonType& j, std_fs::path& p)
464539
{
465540
JSON_THROW(type_error::create(302, concat("type must be string, but is ", j.type_name()), &j));
466541
}
467-
p = *j.template get_ptr<const typename BasicJsonType::string_t*>();
542+
const auto& s = *j.template get_ptr<const typename BasicJsonType::string_t*>();
543+
#ifdef JSON_HAS_CPP_20
544+
p = std_fs::path(std::u8string_view(reinterpret_cast<const char8_t*>(s.data()), s.size()));
545+
#else
546+
p = std_fs::u8path(s); // accepts UTF-8 encoded std::string in C++17, deprecated in C++20
547+
#endif
468548
}
469549
#endif
470550

external/nlohmann_json/include/nlohmann/detail/conversions/to_chars.hpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// __ _____ _____ _____
22
// __| | __| | | | JSON for Modern C++
3-
// | | |__ | | | | | | version 3.11.3
3+
// | | |__ | | | | | | version 3.12.0
44
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
55
//
66
// SPDX-FileCopyrightText: 2009 Florian Loitsch <https://florian.loitsch.com/>
7-
// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me>
7+
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
88
// SPDX-License-Identifier: MIT
99

1010
#pragma once
@@ -239,10 +239,10 @@ boundaries compute_boundaries(FloatType value)
239239
// v- m- v m+ v+
240240

241241
const bool lower_boundary_is_closer = F == 0 && E > 1;
242-
const diyfp m_plus = diyfp(2 * v.f + 1, v.e - 1);
242+
const diyfp m_plus = diyfp((2 * v.f) + 1, v.e - 1);
243243
const diyfp m_minus = lower_boundary_is_closer
244-
? diyfp(4 * v.f - 1, v.e - 2) // (B)
245-
: diyfp(2 * v.f - 1, v.e - 1); // (A)
244+
? diyfp((4 * v.f) - 1, v.e - 2) // (B)
245+
: diyfp((2 * v.f) - 1, v.e - 1); // (A)
246246

247247
// Determine the normalized w+ = m+.
248248
const diyfp w_plus = diyfp::normalize(m_plus);
@@ -472,7 +472,7 @@ inline cached_power get_cached_power_for_binary_exponent(int e)
472472
JSON_ASSERT(e >= -1500);
473473
JSON_ASSERT(e <= 1500);
474474
const int f = kAlpha - e - 1;
475-
const int k = (f * 78913) / (1 << 18) + static_cast<int>(f > 0);
475+
const int k = ((f * 78913) / (1 << 18)) + static_cast<int>(f > 0);
476476

477477
const int index = (-kCachedPowersMinDecExp + k + (kCachedPowersDecStep - 1)) / kCachedPowersDecStep;
478478
JSON_ASSERT(index >= 0);
@@ -950,15 +950,15 @@ inline char* append_exponent(char* buf, int e)
950950
}
951951
else if (k < 100)
952952
{
953-
*buf++ = static_cast<char>('0' + k / 10);
953+
*buf++ = static_cast<char>('0' + (k / 10));
954954
k %= 10;
955955
*buf++ = static_cast<char>('0' + k);
956956
}
957957
else
958958
{
959-
*buf++ = static_cast<char>('0' + k / 100);
959+
*buf++ = static_cast<char>('0' + (k / 100));
960960
k %= 100;
961-
*buf++ = static_cast<char>('0' + k / 10);
961+
*buf++ = static_cast<char>('0' + (k / 10));
962962
k %= 10;
963963
*buf++ = static_cast<char>('0' + k);
964964
}

external/nlohmann_json/include/nlohmann/detail/conversions/to_json.hpp

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
// __ _____ _____ _____
22
// __| | __| | | | JSON for Modern C++
3-
// | | |__ | | | | | | version 3.11.3
3+
// | | |__ | | | | | | version 3.12.0
44
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
55
//
6-
// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me>
6+
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
77
// SPDX-License-Identifier: MIT
88

99
#pragma once
1010

11+
#include <nlohmann/detail/macro_scope.hpp> // JSON_HAS_CPP_17
12+
#ifdef JSON_HAS_CPP_17
13+
#include <optional> // optional
14+
#endif
15+
1116
#include <algorithm> // copy
1217
#include <iterator> // begin, end
1318
#include <string> // string
@@ -18,7 +23,6 @@
1823
#include <vector> // vector
1924

2025
#include <nlohmann/detail/iterators/iteration_proxy.hpp>
21-
#include <nlohmann/detail/macro_scope.hpp>
2226
#include <nlohmann/detail/meta/cpp_future.hpp>
2327
#include <nlohmann/detail/meta/std_fs.hpp>
2428
#include <nlohmann/detail/meta/type_traits.hpp>
@@ -260,6 +264,22 @@ struct external_constructor<value_t::object>
260264
// to_json //
261265
/////////////
262266

267+
#ifdef JSON_HAS_CPP_17
268+
template<typename BasicJsonType, typename T,
269+
enable_if_t<std::is_constructible<BasicJsonType, T>::value, int> = 0>
270+
void to_json(BasicJsonType& j, const std::optional<T>& opt)
271+
{
272+
if (opt.has_value())
273+
{
274+
j = *opt;
275+
}
276+
else
277+
{
278+
j = nullptr;
279+
}
280+
}
281+
#endif
282+
263283
template<typename BasicJsonType, typename T,
264284
enable_if_t<std::is_same<T, typename BasicJsonType::boolean_t>::value, int> = 0>
265285
inline void to_json(BasicJsonType& j, T b) noexcept
@@ -320,7 +340,8 @@ template<typename BasicJsonType, typename EnumType,
320340
inline void to_json(BasicJsonType& j, EnumType e) noexcept
321341
{
322342
using underlying_type = typename std::underlying_type<EnumType>::type;
323-
external_constructor<value_t::number_integer>::construct(j, static_cast<underlying_type>(e));
343+
static constexpr value_t integral_value_t = std::is_unsigned<underlying_type>::value ? value_t::number_unsigned : value_t::number_integer;
344+
external_constructor<integral_value_t>::construct(j, static_cast<underlying_type>(e));
324345
}
325346
#endif // JSON_DISABLE_ENUM_SERIALIZATION
326347

@@ -405,6 +426,13 @@ inline void to_json_tuple_impl(BasicJsonType& j, const Tuple& t, index_sequence<
405426
j = { std::get<Idx>(t)... };
406427
}
407428

429+
template<typename BasicJsonType, typename Tuple>
430+
inline void to_json_tuple_impl(BasicJsonType& j, const Tuple& /*unused*/, index_sequence<> /*unused*/)
431+
{
432+
using array_t = typename BasicJsonType::array_t;
433+
j = array_t();
434+
}
435+
408436
template<typename BasicJsonType, typename T, enable_if_t<is_constructible_tuple<BasicJsonType, T>::value, int > = 0>
409437
inline void to_json(BasicJsonType& j, const T& t)
410438
{
@@ -415,7 +443,12 @@ inline void to_json(BasicJsonType& j, const T& t)
415443
template<typename BasicJsonType>
416444
inline void to_json(BasicJsonType& j, const std_fs::path& p)
417445
{
418-
j = p.string();
446+
#ifdef JSON_HAS_CPP_20
447+
const std::u8string s = p.u8string();
448+
j = std::string(s.begin(), s.end());
449+
#else
450+
j = p.u8string(); // returns std::string in C++17
451+
#endif
419452
}
420453
#endif
421454

0 commit comments

Comments
 (0)