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
9e2dfd19
Commit
9e2dfd19
authored
Jun 07, 2016
by
Niels
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor cleanup
parent
04e1e7b5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
16 deletions
+18
-16
src/json.hpp
src/json.hpp
+9
-8
src/json.hpp.re2c
src/json.hpp.re2c
+9
-8
No files found.
src/json.hpp
View file @
9e2dfd19
...
@@ -1461,13 +1461,13 @@ class basic_json
...
@@ -1461,13 +1461,13 @@ class basic_json
@since version 2.0.0
@since version 2.0.0
*/
*/
template
<
typename
CompatibleNumberUnsignedType
,
typename
template
<
typename
CompatibleNumberUnsignedType
,
typename
std
::
enable_if
<
std
::
enable_if
<
std
::
is_constructible
<
number_unsigned_t
,
CompatibleNumberUnsignedType
>
::
value
and
std
::
is_constructible
<
number_unsigned_t
,
CompatibleNumberUnsignedType
>
::
value
and
std
::
numeric_limits
<
CompatibleNumberUnsignedType
>::
is_integer
and
std
::
numeric_limits
<
CompatibleNumberUnsignedType
>::
is_integer
and
!
std
::
numeric_limits
<
CompatibleNumberUnsignedType
>::
is_signed
,
not
std
::
numeric_limits
<
CompatibleNumberUnsignedType
>::
is_signed
,
CompatibleNumberUnsignedType
>::
type
CompatibleNumberUnsignedType
>::
type
=
0
>
=
0
>
basic_json
(
const
CompatibleNumberUnsignedType
val
)
noexcept
basic_json
(
const
CompatibleNumberUnsignedType
val
)
noexcept
:
m_type
(
value_t
::
number_unsigned
),
:
m_type
(
value_t
::
number_unsigned
),
m_value
(
static_cast
<
number_unsigned_t
>
(
val
))
m_value
(
static_cast
<
number_unsigned_t
>
(
val
))
...
@@ -5079,6 +5079,7 @@ class basic_json
...
@@ -5079,6 +5079,7 @@ class basic_json
throw
std
::
domain_error
(
"iterator does not fit current value"
);
throw
std
::
domain_error
(
"iterator does not fit current value"
);
}
}
// check if range iterators belong to the same JSON object
if
(
first
.
m_object
!=
last
.
m_object
)
if
(
first
.
m_object
!=
last
.
m_object
)
{
{
throw
std
::
domain_error
(
"iterators do not fit"
);
throw
std
::
domain_error
(
"iterators do not fit"
);
...
@@ -7332,7 +7333,7 @@ class basic_json
...
@@ -7332,7 +7333,7 @@ class basic_json
@return string representation of the code point
@return string representation of the code point
@throw std::out_of_range if code point is >0x10ffff; example: `"code
@throw std::out_of_range if code point is >
0x10ffff; example: `"code
points above 0x10FFFF are invalid"`
points above 0x10FFFF are invalid"`
@throw std::invalid_argument if the low surrogate is invalid; example:
@throw std::invalid_argument if the low surrogate is invalid; example:
`""missing or wrong low surrogate""`
`""missing or wrong low surrogate""`
...
...
src/json.hpp.re2c
View file @
9e2dfd19
...
@@ -1461,13 +1461,13 @@ class basic_json
...
@@ -1461,13 +1461,13 @@ class basic_json
@since version 2.0.0
@since version 2.0.0
*/
*/
template <
typename CompatibleNumberUnsignedType, typename
template <typename CompatibleNumberUnsignedType, typename
std::enable_if <
std::enable_if <
std::is_constructible<number_unsigned_t, CompatibleNumberUnsignedType>::value and
std::is_constructible<number_unsigned_t, CompatibleNumberUnsignedType>::value and
std::numeric_limits<CompatibleNumberUnsignedType>::is_integer and
std::numeric_limits<CompatibleNumberUnsignedType>::is_integer and
!
std::numeric_limits<CompatibleNumberUnsignedType>::is_signed,
not
std::numeric_limits<CompatibleNumberUnsignedType>::is_signed,
CompatibleNumberUnsignedType
>::type
CompatibleNumberUnsignedType
>::type
= 0
>
= 0
>
basic_json(const CompatibleNumberUnsignedType val) noexcept
basic_json(const CompatibleNumberUnsignedType val) noexcept
: m_type(value_t::number_unsigned),
: m_type(value_t::number_unsigned),
m_value(static_cast<number_unsigned_t>(val))
m_value(static_cast<number_unsigned_t>(val))
...
@@ -5079,6 +5079,7 @@ class basic_json
...
@@ -5079,6 +5079,7 @@ class basic_json
throw std::domain_error("iterator does not fit current value");
throw std::domain_error("iterator does not fit current value");
}
}
// check if range iterators belong to the same JSON object
if (first.m_object != last.m_object)
if (first.m_object != last.m_object)
{
{
throw std::domain_error("iterators do not fit");
throw std::domain_error("iterators do not fit");
...
@@ -7332,7 +7333,7 @@ class basic_json
...
@@ -7332,7 +7333,7 @@ class basic_json
@return string representation of the code point
@return string representation of the code point
@throw std::out_of_range if code point is >0x10ffff; example: `"code
@throw std::out_of_range if code point is >
0x10ffff; example: `"code
points above 0x10FFFF are invalid"`
points above 0x10FFFF are invalid"`
@throw std::invalid_argument if the low surrogate is invalid; example:
@throw std::invalid_argument if the low surrogate is invalid; example:
`""missing or wrong low surrogate""`
`""missing or wrong low surrogate""`
...
...
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