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
cf829ac2
Commit
cf829ac2
authored
Mar 22, 2015
by
Niels
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed deprecated warnings in issue #42
parent
abc61370
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
14 deletions
+58
-14
src/json.hpp
src/json.hpp
+28
-6
src/json.hpp.re2c
src/json.hpp.re2c
+30
-8
No files found.
src/json.hpp
View file @
cf829ac2
...
...
@@ -2072,11 +2072,22 @@ class basic_json
}
}
/// copy constructor
inline
iterator
(
const
iterator
&
other
)
noexcept
:
m_object
(
other
.
m_object
),
m_it
(
other
.
m_it
)
{}
/// copy assignment
inline
iterator
&
operator
=
(
const
iterator
&
other
)
noexcept
inline
iterator
&
operator
=
(
iterator
other
)
noexcept
(
std
::
is_nothrow_move_constructible
<
pointer
>::
value
and
std
::
is_nothrow_move_assignable
<
pointer
>::
value
and
std
::
is_nothrow_move_constructible
<
internal_iterator
<
typename
array_t
::
iterator
,
typename
object_t
::
iterator
>>::
value
and
std
::
is_nothrow_move_assignable
<
internal_iterator
<
typename
array_t
::
iterator
,
typename
object_t
::
iterator
>>::
value
)
{
m_object
=
other
.
m_object
;
m_it
=
other
.
m_it
;
std
::
swap
(
m_object
,
other
.
m_object
)
;
std
::
swap
(
m_it
,
other
.
m_it
)
;
return
*
this
;
}
...
...
@@ -2575,11 +2586,22 @@ class basic_json
}
}
/// copy constructor
inline
const_iterator
(
const
const_iterator
&
other
)
noexcept
:
m_object
(
other
.
m_object
),
m_it
(
other
.
m_it
)
{}
/// copy assignment
inline
const_iterator
&
operator
=
(
const
const_iterator
&
other
)
noexcept
inline
const_iterator
&
operator
=
(
const_iterator
other
)
noexcept
(
std
::
is_nothrow_move_constructible
<
pointer
>::
value
and
std
::
is_nothrow_move_assignable
<
pointer
>::
value
and
std
::
is_nothrow_move_constructible
<
internal_iterator
<
typename
array_t
::
const_iterator
,
typename
object_t
::
const_iterator
>>::
value
and
std
::
is_nothrow_move_assignable
<
internal_iterator
<
typename
array_t
::
const_iterator
,
typename
object_t
::
const_iterator
>>::
value
)
{
m_object
=
other
.
m_object
;
m_it
=
other
.
m_it
;
std
::
swap
(
m_object
,
other
.
m_object
)
;
std
::
swap
(
m_it
,
other
.
m_it
)
;
return
*
this
;
}
...
...
src/json.hpp.re2c
View file @
cf829ac2
...
...
@@ -2072,11 +2072,22 @@ class basic_json
}
}
/// copy constructor
inline iterator(const iterator& other) noexcept
: m_object(other.m_object), m_it(other.m_it)
{}
/// copy assignment
inline iterator& operator=(const iterator& other) noexcept
{
m_object = other.m_object;
m_it = other.m_it;
inline iterator& operator=(iterator other) noexcept (
std::is_nothrow_move_constructible<pointer>::value and
std::is_nothrow_move_assignable<pointer>::value and
std::is_nothrow_move_constructible<internal_iterator<typename array_t::iterator, typename object_t::iterator>>::value
and
std::is_nothrow_move_assignable<internal_iterator<typename array_t::iterator, typename object_t::iterator>>::value
)
{
std::swap(m_object, other.m_object);
std::swap(m_it, other.m_it);
return *this;
}
...
...
@@ -2575,11 +2586,22 @@ class basic_json
}
}
/// copy constructor
inline const_iterator(const const_iterator& other) noexcept
: m_object(other.m_object), m_it(other.m_it)
{}
/// copy assignment
inline const_iterator& operator=(const const_iterator& other) noexcept
{
m_object = other.m_object;
m_it = other.m_it;
inline const_iterator& operator=(const_iterator other) noexcept(
std::is_nothrow_move_constructible<pointer>::value and
std::is_nothrow_move_assignable<pointer>::value and
std::is_nothrow_move_constructible<internal_iterator<typename array_t::const_iterator, typename object_t::const_iterator>>::value
and
std::is_nothrow_move_assignable<internal_iterator<typename array_t::const_iterator, typename object_t::const_iterator>>::value
)
{
std::swap(m_object, other.m_object);
std::swap(m_it, other.m_it);
return *this;
}
...
...
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