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
3483d923
Unverified
Commit
3483d923
authored
Apr 13, 2020
by
Niels Lohmann
Committed by
GitHub
Apr 13, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2033 from nlohmann/feature/issue1913
Replace deprecated std::is_pod
parents
7fcc8603
9154e991
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
include/nlohmann/detail/output/binary_writer.hpp
include/nlohmann/detail/output/binary_writer.hpp
+1
-1
single_include/nlohmann/json.hpp
single_include/nlohmann/json.hpp
+1
-1
No files found.
include/nlohmann/detail/output/binary_writer.hpp
View file @
3483d923
...
...
@@ -1300,7 +1300,7 @@ class binary_writer
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
(
std
::
is_
pod
<
CharType
>::
value
,
"CharType must be POD
"
);
static_assert
(
std
::
is_
trivial
<
CharType
>::
value
,
"CharType must be trivial
"
);
CharType
result
;
std
::
memcpy
(
&
result
,
&
x
,
sizeof
(
x
));
return
result
;
...
...
single_include/nlohmann/json.hpp
View file @
3483d923
...
...
@@ -12908,7 +12908,7 @@ class binary_writer
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
(
std
::
is_
pod
<
CharType
>::
value
,
"CharType must be POD
"
);
static_assert
(
std
::
is_
trivial
<
CharType
>::
value
,
"CharType must be trivial
"
);
CharType
result
;
std
::
memcpy
(
&
result
,
&
x
,
sizeof
(
x
));
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