Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
json
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
json
Commits
61b46a56
Unverified
Commit
61b46a56
authored
Feb 15, 2020
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🏗
replace is_pod by is_trivial
parent
973c52dd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
binary_writer.hpp
include/nlohmann/detail/output/binary_writer.hpp
+1
-1
json.hpp
single_include/nlohmann/json.hpp
+1
-1
No files found.
include/nlohmann/detail/output/binary_writer.hpp
View file @
61b46a56
...
@@ -1300,7 +1300,7 @@ class binary_writer
...
@@ -1300,7 +1300,7 @@ class binary_writer
static
CharType
to_char_type
(
std
::
uint8_t
x
)
noexcept
static
CharType
to_char_type
(
std
::
uint8_t
x
)
noexcept
{
{
static_assert
(
sizeof
(
std
::
uint8_t
)
==
sizeof
(
CharType
),
"size of CharType must be equal to std::uint8_t"
);
static_assert
(
sizeof
(
std
::
uint8_t
)
==
sizeof
(
CharType
),
"size of CharType must be equal to std::uint8_t"
);
static_assert
(
std
::
is_
pod
<
CharType
>::
value
,
"CharType must be POD
"
);
static_assert
(
std
::
is_
trivial
<
CharType
>::
value
,
"CharType must be trivial
"
);
CharType
result
;
CharType
result
;
std
::
memcpy
(
&
result
,
&
x
,
sizeof
(
x
));
std
::
memcpy
(
&
result
,
&
x
,
sizeof
(
x
));
return
result
;
return
result
;
...
...
single_include/nlohmann/json.hpp
View file @
61b46a56
...
@@ -12592,7 +12592,7 @@ class binary_writer
...
@@ -12592,7 +12592,7 @@ class binary_writer
static
CharType
to_char_type
(
std
::
uint8_t
x
)
noexcept
static
CharType
to_char_type
(
std
::
uint8_t
x
)
noexcept
{
{
static_assert
(
sizeof
(
std
::
uint8_t
)
==
sizeof
(
CharType
),
"size of CharType must be equal to std::uint8_t"
);
static_assert
(
sizeof
(
std
::
uint8_t
)
==
sizeof
(
CharType
),
"size of CharType must be equal to std::uint8_t"
);
static_assert
(
std
::
is_
pod
<
CharType
>::
value
,
"CharType must be POD
"
);
static_assert
(
std
::
is_
trivial
<
CharType
>::
value
,
"CharType must be trivial
"
);
CharType
result
;
CharType
result
;
std
::
memcpy
(
&
result
,
&
x
,
sizeof
(
x
));
std
::
memcpy
(
&
result
,
&
x
,
sizeof
(
x
));
return
result
;
return
result
;
...
...
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