mirror of
https://github.com/nlohmann/json.git
synced 2025-07-28 12:02:00 +03:00
🚨 fix warning
This commit is contained in:
@ -162,7 +162,7 @@ struct static_const
|
||||
#endif
|
||||
|
||||
template<typename T, typename... Args>
|
||||
inline constexpr std::array<T, sizeof...(Args)> make_array(Args&& ... args)
|
||||
constexpr std::array<T, sizeof...(Args)> make_array(Args&& ... args)
|
||||
{
|
||||
return std::array<T, sizeof...(Args)> {{static_cast<T>(std::forward<Args>(args))...}};
|
||||
}
|
||||
|
@ -471,8 +471,8 @@ is_detected<range_value_t, ConstructibleArrayType>::value&&
|
||||
// special case for types like std::filesystem::path whose iterator's value_type are themselves
|
||||
// c.f. https://github.com/nlohmann/json/pull/3073
|
||||
!std::is_same<ConstructibleArrayType, detected_t<range_value_t, ConstructibleArrayType>>::value&&
|
||||
is_complete_type <
|
||||
detected_t<range_value_t, ConstructibleArrayType >>::value >>
|
||||
is_complete_type <
|
||||
detected_t<range_value_t, ConstructibleArrayType >>::value >>
|
||||
{
|
||||
using value_type = range_value_t<ConstructibleArrayType>;
|
||||
|
||||
@ -734,7 +734,7 @@ struct value_in_range_of_impl1<OfType, T, true>
|
||||
};
|
||||
|
||||
template<typename OfType, typename T>
|
||||
inline constexpr bool value_in_range_of(T val)
|
||||
constexpr bool value_in_range_of(T val)
|
||||
{
|
||||
return value_in_range_of_impl1<OfType, T>::test(val);
|
||||
}
|
||||
@ -750,7 +750,7 @@ namespace impl
|
||||
{
|
||||
|
||||
template<typename T>
|
||||
inline constexpr bool is_c_string()
|
||||
constexpr bool is_c_string()
|
||||
{
|
||||
using TUnExt = typename std::remove_extent<T>::type;
|
||||
using TUnCVExt = typename std::remove_cv<TUnExt>::type;
|
||||
@ -778,7 +778,7 @@ namespace impl
|
||||
{
|
||||
|
||||
template<typename T>
|
||||
inline constexpr bool is_transparent()
|
||||
constexpr bool is_transparent()
|
||||
{
|
||||
return is_detected<detect_is_transparent, T>::value;
|
||||
}
|
||||
|
@ -643,7 +643,7 @@ class serializer
|
||||
@param[in] x unsigned integer number to count its digits
|
||||
@return number of decimal digits
|
||||
*/
|
||||
inline unsigned int count_digits(number_unsigned_t x) noexcept
|
||||
unsigned int count_digits(number_unsigned_t x) noexcept
|
||||
{
|
||||
unsigned int n_digits = 1;
|
||||
for (;;)
|
||||
@ -952,7 +952,7 @@ class serializer
|
||||
* absolute values of INT_MIN and INT_MAX are usually not the same. See
|
||||
* #1708 for details.
|
||||
*/
|
||||
inline number_unsigned_t remove_sign(number_integer_t x) noexcept
|
||||
number_unsigned_t remove_sign(number_integer_t x) noexcept
|
||||
{
|
||||
JSON_ASSERT(x < 0 && x < (std::numeric_limits<number_integer_t>::max)()); // NOLINT(misc-redundant-expression)
|
||||
return static_cast<number_unsigned_t>(-(x + 1)) + 1;
|
||||
|
@ -3219,7 +3219,7 @@ struct static_const
|
||||
#endif
|
||||
|
||||
template<typename T, typename... Args>
|
||||
inline constexpr std::array<T, sizeof...(Args)> make_array(Args&& ... args)
|
||||
constexpr std::array<T, sizeof...(Args)> make_array(Args&& ... args)
|
||||
{
|
||||
return std::array<T, sizeof...(Args)> {{static_cast<T>(std::forward<Args>(args))...}};
|
||||
}
|
||||
@ -3884,8 +3884,8 @@ is_detected<range_value_t, ConstructibleArrayType>::value&&
|
||||
// special case for types like std::filesystem::path whose iterator's value_type are themselves
|
||||
// c.f. https://github.com/nlohmann/json/pull/3073
|
||||
!std::is_same<ConstructibleArrayType, detected_t<range_value_t, ConstructibleArrayType>>::value&&
|
||||
is_complete_type <
|
||||
detected_t<range_value_t, ConstructibleArrayType >>::value >>
|
||||
is_complete_type <
|
||||
detected_t<range_value_t, ConstructibleArrayType >>::value >>
|
||||
{
|
||||
using value_type = range_value_t<ConstructibleArrayType>;
|
||||
|
||||
@ -4147,7 +4147,7 @@ struct value_in_range_of_impl1<OfType, T, true>
|
||||
};
|
||||
|
||||
template<typename OfType, typename T>
|
||||
inline constexpr bool value_in_range_of(T val)
|
||||
constexpr bool value_in_range_of(T val)
|
||||
{
|
||||
return value_in_range_of_impl1<OfType, T>::test(val);
|
||||
}
|
||||
@ -4163,7 +4163,7 @@ namespace impl
|
||||
{
|
||||
|
||||
template<typename T>
|
||||
inline constexpr bool is_c_string()
|
||||
constexpr bool is_c_string()
|
||||
{
|
||||
using TUnExt = typename std::remove_extent<T>::type;
|
||||
using TUnCVExt = typename std::remove_cv<TUnExt>::type;
|
||||
@ -4191,7 +4191,7 @@ namespace impl
|
||||
{
|
||||
|
||||
template<typename T>
|
||||
inline constexpr bool is_transparent()
|
||||
constexpr bool is_transparent()
|
||||
{
|
||||
return is_detected<detect_is_transparent, T>::value;
|
||||
}
|
||||
@ -18652,7 +18652,7 @@ class serializer
|
||||
@param[in] x unsigned integer number to count its digits
|
||||
@return number of decimal digits
|
||||
*/
|
||||
inline unsigned int count_digits(number_unsigned_t x) noexcept
|
||||
unsigned int count_digits(number_unsigned_t x) noexcept
|
||||
{
|
||||
unsigned int n_digits = 1;
|
||||
for (;;)
|
||||
@ -18961,7 +18961,7 @@ class serializer
|
||||
* absolute values of INT_MIN and INT_MAX are usually not the same. See
|
||||
* #1708 for details.
|
||||
*/
|
||||
inline number_unsigned_t remove_sign(number_integer_t x) noexcept
|
||||
number_unsigned_t remove_sign(number_integer_t x) noexcept
|
||||
{
|
||||
JSON_ASSERT(x < 0 && x < (std::numeric_limits<number_integer_t>::max)()); // NOLINT(misc-redundant-expression)
|
||||
return static_cast<number_unsigned_t>(-(x + 1)) + 1;
|
||||
|
Reference in New Issue
Block a user