Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
json
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
json
Commits
d1479e47
Unverified
Commit
d1479e47
authored
Feb 18, 2017
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
💄
added assertion message
parent
513eb3ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
src/json.hpp
src/json.hpp
+4
-2
src/json.hpp.re2c
src/json.hpp.re2c
+2
-2
No files found.
src/json.hpp
View file @
d1479e47
...
...
@@ -8251,7 +8251,8 @@ class basic_json
return
;
}
static_assert
(
std
::
numeric_limits
<
NumberType
>::
digits10
<=
s_capacity
,
""
);
static_assert
(
std
::
numeric_limits
<
NumberType
>::
digits10
<=
s_capacity
,
"unexpected NumberType"
);
const
bool
is_neg
=
x
<
0
;
size_t
i
=
0
;
...
...
@@ -8283,7 +8284,8 @@ 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
,
""
);
static_assert
(
d
==
6
or
d
==
15
or
d
==
16
or
d
==
17
,
"unexpected NumberType"
);
static
constexpr
auto
fmt
=
d
==
6
?
"%.7g"
:
d
==
15
?
"%.16g"
...
...
src/json.hpp.re2c
View file @
d1479e47
...
...
@@ -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"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment