summaryrefslogtreecommitdiff
path: root/boost/serialization/archive_input_unordered_map.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/serialization/archive_input_unordered_map.hpp')
-rw-r--r--boost/serialization/archive_input_unordered_map.hpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/boost/serialization/archive_input_unordered_map.hpp b/boost/serialization/archive_input_unordered_map.hpp
index 7ea06e1a68..ef0fd93ebd 100644
--- a/boost/serialization/archive_input_unordered_map.hpp
+++ b/boost/serialization/archive_input_unordered_map.hpp
@@ -37,10 +37,13 @@ struct archive_input_unordered_map
){
typedef typename Container::value_type type;
detail::stack_construct<Archive, type> t(ar, v);
- // borland fails silently w/o full namespace
ar >> boost::serialization::make_nvp("item", t.reference());
std::pair<typename Container::const_iterator, bool> result =
- s.insert(t.reference());
+ #ifdef BOOST_NO_CXX11_HDR_UNORDERED_MAP
+ s.insert(t.reference());
+ #else
+ s.emplace(t.reference());
+ #endif
// 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.
@@ -64,10 +67,13 @@ struct archive_input_unordered_multimap
){
typedef typename Container::value_type type;
detail::stack_construct<Archive, type> t(ar, v);
- // borland fails silently w/o full namespace
ar >> boost::serialization::make_nvp("item", t.reference());
- typename Container::const_iterator result
- = s.insert(t.reference());
+ typename Container::const_iterator result =
+ #ifdef BOOST_NO_CXX11_HDR_UNORDERED_MAP
+ s.insert(t.reference());
+ #else
+ s.emplace(t.reference());
+ #endif
// 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.