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
046df035
Unverified
Commit
046df035
authored
Aug 06, 2021
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
♻
change type of binary subtype
parent
3eb1fb6b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
include/nlohmann/detail/output/serializer.hpp
include/nlohmann/detail/output/serializer.hpp
+2
-1
single_include/nlohmann/json.hpp
single_include/nlohmann/json.hpp
+2
-1
No files found.
include/nlohmann/detail/output/serializer.hpp
View file @
046df035
...
@@ -674,6 +674,7 @@ class serializer
...
@@ -674,6 +674,7 @@ class serializer
@tparam NumberType either @a number_integer_t or @a number_unsigned_t
@tparam NumberType either @a number_integer_t or @a number_unsigned_t
*/
*/
template
<
typename
NumberType
,
detail
::
enable_if_t
<
template
<
typename
NumberType
,
detail
::
enable_if_t
<
std
::
is_integral
<
NumberType
>
::
value
||
std
::
is_same
<
NumberType
,
number_unsigned_t
>::
value
||
std
::
is_same
<
NumberType
,
number_unsigned_t
>::
value
||
std
::
is_same
<
NumberType
,
number_integer_t
>::
value
||
std
::
is_same
<
NumberType
,
number_integer_t
>::
value
||
std
::
is_same
<
NumberType
,
binary_char_t
>::
value
,
std
::
is_same
<
NumberType
,
binary_char_t
>::
value
,
...
@@ -706,7 +707,7 @@ class serializer
...
@@ -706,7 +707,7 @@ class serializer
// use a pointer to fill the buffer
// use a pointer to fill the buffer
auto
buffer_ptr
=
number_buffer
.
begin
();
// NOLINT(llvm-qualified-auto,readability-qualified-auto,cppcoreguidelines-pro-type-vararg,hicpp-vararg)
auto
buffer_ptr
=
number_buffer
.
begin
();
// NOLINT(llvm-qualified-auto,readability-qualified-auto,cppcoreguidelines-pro-type-vararg,hicpp-vararg)
const
bool
is_negative
=
std
::
is_s
ame
<
NumberType
,
number_integer_t
>::
value
&&
!
(
x
>=
0
);
// see issue #755
const
bool
is_negative
=
std
::
is_s
igned
<
NumberType
>::
value
&&
!
(
x
>=
0
);
// see issue #755
number_unsigned_t
abs_value
;
number_unsigned_t
abs_value
;
unsigned
int
n_chars
{};
unsigned
int
n_chars
{};
...
...
single_include/nlohmann/json.hpp
View file @
046df035
...
@@ -16692,6 +16692,7 @@ class serializer
...
@@ -16692,6 +16692,7 @@ class serializer
@tparam NumberType either @a number_integer_t or @a number_unsigned_t
@tparam NumberType either @a number_integer_t or @a number_unsigned_t
*/
*/
template
<
typename
NumberType
,
detail
::
enable_if_t
<
template
<
typename
NumberType
,
detail
::
enable_if_t
<
std
::
is_integral
<
NumberType
>
::
value
||
std
::
is_same
<
NumberType
,
number_unsigned_t
>::
value
||
std
::
is_same
<
NumberType
,
number_unsigned_t
>::
value
||
std
::
is_same
<
NumberType
,
number_integer_t
>::
value
||
std
::
is_same
<
NumberType
,
number_integer_t
>::
value
||
std
::
is_same
<
NumberType
,
binary_char_t
>::
value
,
std
::
is_same
<
NumberType
,
binary_char_t
>::
value
,
...
@@ -16724,7 +16725,7 @@ class serializer
...
@@ -16724,7 +16725,7 @@ class serializer
// use a pointer to fill the buffer
// use a pointer to fill the buffer
auto
buffer_ptr
=
number_buffer
.
begin
();
// NOLINT(llvm-qualified-auto,readability-qualified-auto,cppcoreguidelines-pro-type-vararg,hicpp-vararg)
auto
buffer_ptr
=
number_buffer
.
begin
();
// NOLINT(llvm-qualified-auto,readability-qualified-auto,cppcoreguidelines-pro-type-vararg,hicpp-vararg)
const
bool
is_negative
=
std
::
is_s
ame
<
NumberType
,
number_integer_t
>::
value
&&
!
(
x
>=
0
);
// see issue #755
const
bool
is_negative
=
std
::
is_s
igned
<
NumberType
>::
value
&&
!
(
x
>=
0
);
// see issue #755
number_unsigned_t
abs_value
;
number_unsigned_t
abs_value
;
unsigned
int
n_chars
{};
unsigned
int
n_chars
{};
...
...
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