mirror of
https://github.com/MadeOfJelly/MushMachine.git
synced 2025-06-20 11:46:36 +02:00
update nlohmann::json to v3.11.1
This commit is contained in:
@ -1,3 +1,12 @@
|
||||
// __ _____ _____ _____
|
||||
// __| | __| | | | JSON for Modern C++
|
||||
// | | |__ | | | | | | version 3.11.1
|
||||
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
|
||||
//
|
||||
// SPDX-FileCopyrightText: 2009 Florian Loitsch <https://florian.loitsch.com/>
|
||||
// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann <https://nlohmann.me>
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <array> // array
|
||||
@ -9,8 +18,7 @@
|
||||
|
||||
#include <nlohmann/detail/macro_scope.hpp>
|
||||
|
||||
namespace nlohmann
|
||||
{
|
||||
NLOHMANN_JSON_NAMESPACE_BEGIN
|
||||
namespace detail
|
||||
{
|
||||
|
||||
@ -891,7 +899,7 @@ void grisu2(char* buf, int& len, int& decimal_exponent, FloatType value)
|
||||
//
|
||||
// The documentation for 'std::to_chars' (https://en.cppreference.com/w/cpp/utility/to_chars)
|
||||
// says "value is converted to a string as if by std::sprintf in the default ("C") locale"
|
||||
// and since sprintf promotes float's to double's, I think this is exactly what 'std::to_chars'
|
||||
// and since sprintf promotes floats to doubles, I think this is exactly what 'std::to_chars'
|
||||
// does.
|
||||
// On the other hand, the documentation for 'std::to_chars' requires that "parsing the
|
||||
// representation using the corresponding std::from_chars function recovers value exactly". That
|
||||
@ -1039,7 +1047,7 @@ inline char* format_buffer(char* buf, int len, int decimal_exponent,
|
||||
return append_exponent(buf, n - 1);
|
||||
}
|
||||
|
||||
} // namespace dtoa_impl
|
||||
} // namespace dtoa_impl
|
||||
|
||||
/*!
|
||||
@brief generates a decimal representation of the floating-point number value in [first, last).
|
||||
@ -1106,5 +1114,5 @@ char* to_chars(char* first, const char* last, FloatType value)
|
||||
return dtoa_impl::format_buffer(first, len, decimal_exponent, kMinExp, kMaxExp);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
} // namespace nlohmann
|
||||
} // namespace detail
|
||||
NLOHMANN_JSON_NAMESPACE_END
|
||||
|
Reference in New Issue
Block a user