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
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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
14 deletions
+58
-14
json.hpp
src/json.hpp
+28
-6
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
...
@@ -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
/// 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
;
std
::
swap
(
m_object
,
other
.
m_object
)
;
m_it
=
other
.
m_it
;
std
::
swap
(
m_it
,
other
.
m_it
)
;
return
*
this
;
return
*
this
;
}
}
...
@@ -2575,11 +2586,22 @@ class basic_json
...
@@ -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
/// 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
;
std
::
swap
(
m_object
,
other
.
m_object
)
;
m_it
=
other
.
m_it
;
std
::
swap
(
m_it
,
other
.
m_it
)
;
return
*
this
;
return
*
this
;
}
}
...
...
src/json.hpp.re2c
View file @
cf829ac2
...
@@ -2072,11 +2072,22 @@ class basic_json
...
@@ -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
/// copy assignment
inline iterator& operator=(const iterator& other) noexcept
inline iterator& operator=(iterator other) noexcept (
{
std::is_nothrow_move_constructible<pointer>::value and
m_object = other.m_object;
std::is_nothrow_move_assignable<pointer>::value and
m_it = other.m_it;
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;
return *this;
}
}
...
@@ -2575,11 +2586,22 @@ class basic_json
...
@@ -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
/// 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
m_object = other.m_object;
std::is_nothrow_move_assignable<pointer>::value and
m_it = other.m_it;
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;
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