From 2d5f0c05499e7a0c0f94e82b8c35b03b30a1f94d Mon Sep 17 00:00:00 2001 From: HenryLee Date: Wed, 31 May 2017 00:50:14 +1000 Subject: [PATCH] Redefine the converting assignment in iterator --- src/json.hpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/json.hpp b/src/json.hpp index e92580c2..1bd8addc 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -8078,15 +8078,10 @@ class basic_json @return const/non-const iterator @note It is not checked whether @a other is initialized. */ - iter_impl& operator=(iter_impl other) noexcept( - std::is_nothrow_move_constructible::value and - std::is_nothrow_move_assignable::value and - std::is_nothrow_move_constructible::value and - std::is_nothrow_move_assignable::value - ) + iter_impl& operator=(const iter_impl& other) noexcept { - std::swap(m_object, other.m_object); - std::swap(m_it, other.m_it); + m_object = other.m_object; + m_it = other.m_it; return *this; }