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
87df1d67
Unverified
Commit
87df1d67
authored
Oct 29, 2017
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
https://github.com/nlohmann/json
into develop
parents
fa1425b8
73d00951
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
1 deletion
+25
-1
src/json.hpp
src/json.hpp
+1
-1
test/src/unit-regression.cpp
test/src/unit-regression.cpp
+24
-0
No files found.
src/json.hpp
View file @
87df1d67
...
@@ -6789,7 +6789,7 @@ class json_ref
...
@@ -6789,7 +6789,7 @@ class json_ref
{}
{}
template
<
class
...
Args
>
template
<
class
...
Args
>
json_ref
(
Args
...
args
)
json_ref
(
Args
&&
...
args
)
:
owned_value
(
std
::
forward
<
Args
>
(
args
)...),
:
owned_value
(
std
::
forward
<
Args
>
(
args
)...),
value_ref
(
&
owned_value
),
value_ref
(
&
owned_value
),
is_rvalue
(
true
)
is_rvalue
(
true
)
...
...
test/src/unit-regression.cpp
View file @
87df1d67
...
@@ -36,6 +36,22 @@ using nlohmann::json;
...
@@ -36,6 +36,22 @@ using nlohmann::json;
#include <list>
#include <list>
#include <cstdio>
#include <cstdio>
namespace
{
struct
nocopy
{
nocopy
()
=
default
;
nocopy
(
const
nocopy
&
)
=
delete
;
int
val
=
0
;
friend
void
to_json
(
json
&
j
,
const
nocopy
&
n
)
{
j
=
{{
"val"
,
n
.
val
}};
}
};
}
TEST_CASE
(
"regression tests"
)
TEST_CASE
(
"regression tests"
)
{
{
SECTION
(
"issue #60 - Double quotation mark is not parsed correctly"
)
SECTION
(
"issue #60 - Double quotation mark is not parsed correctly"
)
...
@@ -1282,4 +1298,12 @@ TEST_CASE("regression tests")
...
@@ -1282,4 +1298,12 @@ TEST_CASE("regression tests")
}
}
}
}
*/
*/
SECTION
(
"issue #805 - copy constructor is used with std::initializer_list constructor."
)
{
nocopy
n
;
json
j
;
j
=
{{
"nocopy"
,
n
}};
CHECK
(
j
[
"nocopy"
][
"val"
]
==
0
);
}
}
}
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