diff options
Diffstat (limited to 'boost/serialization/archive_input_unordered_map.hpp')
-rw-r--r-- | boost/serialization/archive_input_unordered_map.hpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/boost/serialization/archive_input_unordered_map.hpp b/boost/serialization/archive_input_unordered_map.hpp index ef0fd93ebd..ccf806b181 100644 --- a/boost/serialization/archive_input_unordered_map.hpp +++ b/boost/serialization/archive_input_unordered_map.hpp @@ -19,8 +19,10 @@ // See http://www.boost.org for updates, documentation, and revision history. #include <boost/config.hpp> - +#include <boost/serialization/nvp.hpp> +#include <boost/serialization/detail/stack_constructor.hpp> #include <boost/serialization/utility.hpp> +#include <boost/move/utility_core.hpp> namespace boost { namespace serialization { @@ -39,11 +41,7 @@ struct archive_input_unordered_map detail::stack_construct<Archive, type> t(ar, v); ar >> boost::serialization::make_nvp("item", t.reference()); std::pair<typename Container::const_iterator, bool> result = - #ifdef BOOST_NO_CXX11_HDR_UNORDERED_MAP - s.insert(t.reference()); - #else - s.emplace(t.reference()); - #endif + s.insert(boost::move(t.reference())); // note: the following presumes that the map::value_type was NOT tracked // in the archive. This is the usual case, but here there is no way // to determine that. @@ -69,11 +67,7 @@ struct archive_input_unordered_multimap detail::stack_construct<Archive, type> t(ar, v); ar >> boost::serialization::make_nvp("item", t.reference()); typename Container::const_iterator result = - #ifdef BOOST_NO_CXX11_HDR_UNORDERED_MAP - s.insert(t.reference()); - #else - s.emplace(t.reference()); - #endif + s.insert(t.reference()); // note: the following presumes that the map::value_type was NOT tracked // in the archive. This is the usual case, but here there is no way // to determine that. |