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
c0ae88bf
Unverified
Commit
c0ae88bf
authored
Nov 05, 2019
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🚨
fix linter errors
parent
62dada05
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
unit-regression.cpp
test/src/unit-regression.cpp
+10
-2
No files found.
test/src/unit-regression.cpp
View file @
c0ae88bf
...
...
@@ -166,7 +166,7 @@ namespace
{
struct
NonDefaultFromJsonStruct
{
};
inline
bool
operator
==
(
NonDefaultFromJsonStruct
const
&
lhs
,
NonDefaultFromJsonStruct
const
&
rhs
)
inline
bool
operator
==
(
NonDefaultFromJsonStruct
const
&
,
NonDefaultFromJsonStruct
const
&
)
{
return
true
;
}
...
...
@@ -185,7 +185,7 @@ namespace nlohmann
template
<>
struct
adl_serializer
<
NonDefaultFromJsonStruct
>
{
static
NonDefaultFromJsonStruct
from_json
(
json
const
&
j
)
static
NonDefaultFromJsonStruct
from_json
(
json
const
&
)
{
return
{};
}
...
...
@@ -1872,8 +1872,16 @@ TEST_CASE("regression tests")
SECTION
(
"issue #1647 - compile error when deserializing enum if both non-default from_json and non-member operator== exists for other type"
)
{
{
json
j
;
NonDefaultFromJsonStruct
x
=
j
;
NonDefaultFromJsonStruct
y
;
CHECK
(
x
==
y
);
}
auto
val
=
nlohmann
::
json
(
"one"
).
get
<
for_1647
>
();
CHECK
(
val
==
for_1647
::
one
);
json
j
=
val
;
}
SECTION
(
"issue #1805 - A pair<T1, T2> is json constructible only if T1 and T2 are json constructible"
)
...
...
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