summaryrefslogtreecommitdiff
path: root/boost/archive/basic_binary_iprimitive.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/archive/basic_binary_iprimitive.hpp')
-rw-r--r--boost/archive/basic_binary_iprimitive.hpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/boost/archive/basic_binary_iprimitive.hpp b/boost/archive/basic_binary_iprimitive.hpp
index 5e826310d7..40f45d9c2f 100644
--- a/boost/archive/basic_binary_iprimitive.hpp
+++ b/boost/archive/basic_binary_iprimitive.hpp
@@ -44,16 +44,16 @@ namespace std{
#endif
#include <boost/cstdint.hpp>
-#include <boost/scoped_ptr.hpp>
#include <boost/serialization/throw_exception.hpp>
#include <boost/integer.hpp>
#include <boost/integer_traits.hpp>
-#include <boost/mpl/placeholders.hpp>
+//#include <boost/mpl/placeholders.hpp>
#include <boost/serialization/is_bitwise_serializable.hpp>
#include <boost/serialization/array.hpp>
#include <boost/archive/basic_streambuf_locale_saver.hpp>
+#include <boost/archive/codecvt_null.hpp>
#include <boost/archive/archive_exception.hpp>
#include <boost/archive/detail/auto_link_archive.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
@@ -61,9 +61,6 @@ namespace std{
namespace boost {
namespace archive {
-template<class Ch>
-class codecvt_null;
-
/////////////////////////////////////////////////////////////////////////////
// class binary_iarchive - read serialized objects from a input binary stream
template<class Archive, class Elem, class Tr>
@@ -81,9 +78,16 @@ public:
}
#ifndef BOOST_NO_STD_LOCALE
- boost::scoped_ptr<codecvt_null<Elem> > codecvt_facet;
- boost::scoped_ptr<std::locale> archive_locale;
+ // note order! - if you change this, libstd++ will fail!
+ // a) create new locale with new codecvt facet
+ // b) save current locale
+ // c) change locale to new one
+ // d) use stream buffer
+ // e) change locale back to original
+ // f) destroy new codecvt facet
+ boost::archive::codecvt_null<Elem> codecvt_null_facet;
basic_streambuf_locale_saver<Elem, Tr> locale_saver;
+ std::locale archive_locale;
#endif
// main template for serilization of primitive types
@@ -139,7 +143,7 @@ public:
// the optimized load_array dispatches to load_binary
template <class ValueType>
- void load_array(serialization::array<ValueType>& a, unsigned int)
+ void load_array(serialization::array_wrapper<ValueType>& a, unsigned int)
{
load_binary(a.address(),a.count()*sizeof(ValueType));
}