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
7fa4ddf9
Unverified
Commit
7fa4ddf9
authored
Jun 23, 2018
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
💄
fixed indentation
parent
bf348ca8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
include/nlohmann/detail/conversions/to_json.hpp
include/nlohmann/detail/conversions/to_json.hpp
+9
-9
single_include/nlohmann/json.hpp
single_include/nlohmann/json.hpp
+1
-1
test/src/unit-conversions.cpp
test/src/unit-conversions.cpp
+1
-1
No files found.
include/nlohmann/detail/conversions/to_json.hpp
View file @
7fa4ddf9
...
@@ -52,15 +52,15 @@ struct external_constructor<value_t::string>
...
@@ -52,15 +52,15 @@ struct external_constructor<value_t::string>
j
.
assert_invariant
();
j
.
assert_invariant
();
}
}
template
<
typename
BasicJsonType
,
typename
CompatibleStringType
,
template
<
typename
BasicJsonType
,
typename
CompatibleStringType
,
enable_if_t
<
not
std
::
is_same
<
CompatibleStringType
,
typename
BasicJsonType
::
string_t
>
::
value
,
enable_if_t
<
not
std
::
is_same
<
CompatibleStringType
,
typename
BasicJsonType
::
string_t
>
::
value
,
int
>
=
0
>
int
>
=
0
>
static
void
construct
(
BasicJsonType
&
j
,
const
CompatibleStringType
&
str
)
static
void
construct
(
BasicJsonType
&
j
,
const
CompatibleStringType
&
str
)
{
{
j
.
m_type
=
value_t
::
string
;
j
.
m_type
=
value_t
::
string
;
j
.
m_value
.
string
=
j
.
template
create
<
typename
BasicJsonType
::
string_t
>(
str
);
j
.
m_value
.
string
=
j
.
template
create
<
typename
BasicJsonType
::
string_t
>(
str
);
j
.
assert_invariant
();
j
.
assert_invariant
();
}
}
};
};
template
<
>
template
<
>
...
...
single_include/nlohmann/json.hpp
View file @
7fa4ddf9
...
@@ -6091,8 +6091,8 @@ class binary_reader
...
@@ -6091,8 +6091,8 @@ class binary_reader
const
double
val
=
[
&
half
]
const
double
val
=
[
&
half
]
{
{
const
int
exp
=
(
half
>>
10
)
&
0x1F
;
const
int
exp
=
(
half
>>
10
)
&
0x1F
;
assert
(
0
<=
exp
and
exp
<=
32
);
const
int
mant
=
half
&
0x3FF
;
const
int
mant
=
half
&
0x3FF
;
assert
(
0
<=
exp
and
exp
<=
32
);
assert
(
0
<=
mant
and
mant
<=
1024
);
assert
(
0
<=
mant
and
mant
<=
1024
);
switch
(
exp
)
switch
(
exp
)
{
{
...
...
test/src/unit-conversions.cpp
View file @
7fa4ddf9
...
@@ -48,7 +48,7 @@ using nlohmann::json;
...
@@ -48,7 +48,7 @@ using nlohmann::json;
#endif
#endif
#if defined(JSON_HAS_CPP_17)
#if defined(JSON_HAS_CPP_17)
#include <string_view>
#include <string_view>
#endif
#endif
TEST_CASE
(
"value conversion"
)
TEST_CASE
(
"value conversion"
)
...
...
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