mirror of
https://github.com/nlohmann/json.git
synced 2025-07-12 09:21:42 +03:00
💄 added assertion message
This commit is contained in:
@ -8252,7 +8252,7 @@ class basic_json
|
||||
}
|
||||
|
||||
static_assert(std::numeric_limits<NumberType>::digits10 <= s_capacity,
|
||||
"unexpected NumberType");
|
||||
"unexpected NumberType");
|
||||
|
||||
const bool is_neg = x < 0;
|
||||
size_t i = 0;
|
||||
@ -8285,7 +8285,7 @@ class basic_json
|
||||
|
||||
static constexpr auto d = std::numeric_limits<NumberType>::digits10;
|
||||
static_assert(d == 6 or d == 15 or d == 16 or d == 17,
|
||||
"unexpected NumberType");
|
||||
"unexpected NumberType");
|
||||
|
||||
static constexpr auto fmt = d == 6 ? "%.7g"
|
||||
: d == 15 ? "%.16g"
|
||||
|
Reference in New Issue
Block a user