Remove the iter_impl<const basic_json> copy constructor and copy assignment
This commit is contained in:
parent
790e7ca9e9
commit
881cd3f420
1 changed files with 7 additions and 33 deletions
36
src/json.hpp
36
src/json.hpp
|
@ -8054,9 +8054,10 @@ class basic_json
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@note The conventional copy constructor is not defined. It is replaced
|
@note The conventional copy constructor and copy assignment are
|
||||||
by either of the following two converting constructors.
|
implicitly defined.
|
||||||
They support copy from iterator to iterator,
|
Combined with the following converting constructor and assigment,
|
||||||
|
they support: copy from iterator to iterator,
|
||||||
copy from const iterator to const iterator,
|
copy from const iterator to const iterator,
|
||||||
and conversion from iterator to const iterator.
|
and conversion from iterator to const iterator.
|
||||||
However conversion from const iterator to iterator is not defined.
|
However conversion from const iterator to iterator is not defined.
|
||||||
|
@ -8072,16 +8073,7 @@ class basic_json
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@brief converting constructor
|
@brief converting assignment
|
||||||
@param[in] other const iterator to copy from
|
|
||||||
@note It is not checked whether @a other is initialized.
|
|
||||||
*/
|
|
||||||
iter_impl<const basic_json>(const iter_impl<const basic_json>& other) noexcept
|
|
||||||
: m_object(other.m_object), m_it(other.m_it)
|
|
||||||
{}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
@brief copy assignment
|
|
||||||
@param[in,out] other non-const iterator to copy from
|
@param[in,out] other non-const iterator to copy from
|
||||||
@return const/non-const iterator
|
@return const/non-const iterator
|
||||||
@note It is not checked whether @a other is initialized.
|
@note It is not checked whether @a other is initialized.
|
||||||
|
@ -8098,24 +8090,6 @@ class basic_json
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
|
||||||
@brief copy assignment
|
|
||||||
@param[in,out] other const iterator to copy from
|
|
||||||
@return const iterator
|
|
||||||
@note It is not checked whether @a other is initialized.
|
|
||||||
*/
|
|
||||||
iter_impl<const basic_json>& operator=(iter_impl<const basic_json> other) noexcept(
|
|
||||||
std::is_nothrow_move_constructible<pointer>::value and
|
|
||||||
std::is_nothrow_move_assignable<pointer>::value and
|
|
||||||
std::is_nothrow_move_constructible<struct internal_iterator>::value and
|
|
||||||
std::is_nothrow_move_assignable<struct internal_iterator>::value
|
|
||||||
)
|
|
||||||
{
|
|
||||||
std::swap(m_object, other.m_object);
|
|
||||||
std::swap(m_it, other.m_it);
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/*!
|
/*!
|
||||||
@brief set the iterator to the first value
|
@brief set the iterator to the first value
|
||||||
|
|
Loading…
Reference in a new issue