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
f907f950
Unverified
Commit
f907f950
authored
Jul 16, 2021
by
Niels Lohmann
Committed by
GitHub
Jul 16, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2875 from nlohmann/issue2592
Suppress C4127 warning in unit-json_pointer.cpp
parents
c89e23c6
92ec3573
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
test/src/unit-json_pointer.cpp
test/src/unit-json_pointer.cpp
+8
-0
No files found.
test/src/unit-json_pointer.cpp
View file @
f907f950
...
...
@@ -358,6 +358,10 @@ TEST_CASE("JSON pointers")
CHECK_THROWS_WITH
(
j_const
[
jp
]
==
1
,
throw_msg
.
c_str
());
}
#if defined(_MSC_VER)
#pragma warning (push)
#pragma warning (disable : 4127) // on some machines, the check below is not constant
#endif
if
(
sizeof
(
typename
json
::
size_type
)
<
sizeof
(
unsigned
long
long
))
{
auto
size_type_max_uul
=
static_cast
<
unsigned
long
long
>
((
std
::
numeric_limits
<
json
::
size_type
>::
max
)());
...
...
@@ -371,6 +375,10 @@ TEST_CASE("JSON pointers")
CHECK_THROWS_WITH
(
j_const
[
jp
]
==
1
,
throw_msg
.
c_str
());
}
#if defined(_MSC_VER)
#pragma warning (pop)
#endif
CHECK_THROWS_AS
(
j
.
at
(
"/one"
_json_pointer
)
=
1
,
json
::
parse_error
&
);
CHECK_THROWS_WITH
(
j
.
at
(
"/one"
_json_pointer
)
=
1
,
"[json.exception.parse_error.109] parse error: array index 'one' is not a number"
);
...
...
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