1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-12 09:21:42 +03:00

Fixed suffixing .0 and modified the unit tests accordingly

This commit is contained in:
Alex Astashyn
2016-12-04 01:38:23 -05:00
parent 21cae35930
commit 2197856395
3 changed files with 9 additions and 7 deletions

View File

@ -6520,8 +6520,9 @@ class basic_json
const bool value_is_int_like =
std::find_if(m_buf.begin(), data_end,
[](const char c)
{ return (c >= '0' and c <= '9')
or c == '-'; })
{ return c == '.'
or c == 'e'
or c == 'E'; })
== data_end;
assert(data_end + 2 < m_buf.end());