summaryrefslogtreecommitdiff
path: root/boost/archive
diff options
context:
space:
mode:
Diffstat (limited to 'boost/archive')
-rw-r--r--boost/archive/basic_text_iarchive.hpp2
-rw-r--r--boost/archive/codecvt_null.hpp13
-rw-r--r--boost/archive/detail/iserializer.hpp2
-rw-r--r--boost/archive/impl/archive_serializer_map.ipp4
-rw-r--r--boost/archive/impl/basic_binary_iprimitive.ipp4
-rw-r--r--boost/archive/impl/basic_binary_oprimitive.ipp2
-rw-r--r--boost/archive/impl/text_wiarchive_impl.ipp2
-rw-r--r--boost/archive/impl/xml_woarchive_impl.ipp2
-rw-r--r--boost/archive/iterators/base64_from_binary.hpp2
-rw-r--r--boost/archive/iterators/binary_from_base64.hpp2
-rw-r--r--boost/archive/iterators/escape.hpp3
-rw-r--r--boost/archive/iterators/istream_iterator.hpp6
-rw-r--r--boost/archive/iterators/mb_from_wchar.hpp3
-rw-r--r--boost/archive/iterators/transform_width.hpp1
-rw-r--r--boost/archive/iterators/wchar_from_mb.hpp2
-rw-r--r--boost/archive/wcslen.hpp2
16 files changed, 35 insertions, 17 deletions
diff --git a/boost/archive/basic_text_iarchive.hpp b/boost/archive/basic_text_iarchive.hpp
index 583041d8b4..48a646cc1f 100644
--- a/boost/archive/basic_text_iarchive.hpp
+++ b/boost/archive/basic_text_iarchive.hpp
@@ -21,7 +21,7 @@
//
// note the fact that on libraries without wide characters, ostream is
// is not a specialization of basic_ostream which in fact is not defined
-// in such cases. So we can't use basic_ostream<IStream::char_type> but rather
+// in such cases. So we can't use basic_istream<IStream::char_type> but rather
// use two template parameters
#include <boost/config.hpp>
diff --git a/boost/archive/codecvt_null.hpp b/boost/archive/codecvt_null.hpp
index 9cc9e5729d..7bce2b9b32 100644
--- a/boost/archive/codecvt_null.hpp
+++ b/boost/archive/codecvt_null.hpp
@@ -18,8 +18,11 @@
#include <locale>
#include <cstddef> // NULL, size_t
+#ifndef BOOST_NO_CWCHAR
#include <cwchar> // for mbstate_t
+#endif
#include <boost/config.hpp>
+#include <boost/serialization/force_include.hpp>
#include <boost/archive/detail/auto_link_archive.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
@@ -62,7 +65,7 @@ public:
template<>
class BOOST_SYMBOL_VISIBLE codecvt_null<wchar_t> : public std::codecvt<wchar_t, char, std::mbstate_t>
{
- virtual BOOST_WARCHIVE_DECL std::codecvt_base::result
+ virtual BOOST_WARCHIVE_DECL BOOST_DLLEXPORT std::codecvt_base::result
do_out(
std::mbstate_t & state,
const wchar_t * first1,
@@ -71,8 +74,8 @@ class BOOST_SYMBOL_VISIBLE codecvt_null<wchar_t> : public std::codecvt<wchar_t,
char * first2,
char * last2,
char * & next2
- ) const;
- virtual BOOST_WARCHIVE_DECL std::codecvt_base::result
+ ) const BOOST_USED;
+ virtual BOOST_WARCHIVE_DECL BOOST_DLLEXPORT std::codecvt_base::result
do_in(
std::mbstate_t & state,
const char * first1,
@@ -81,7 +84,7 @@ class BOOST_SYMBOL_VISIBLE codecvt_null<wchar_t> : public std::codecvt<wchar_t,
wchar_t * first2,
wchar_t * last2,
wchar_t * & next2
- ) const;
+ ) const BOOST_USED;
virtual int do_encoding( ) const throw( ){
return sizeof(wchar_t) / sizeof(char);
}
@@ -89,7 +92,7 @@ class BOOST_SYMBOL_VISIBLE codecvt_null<wchar_t> : public std::codecvt<wchar_t,
return do_encoding();
}
public:
- explicit codecvt_null(std::size_t no_locale_manage = 0) :
+ BOOST_DLLEXPORT explicit codecvt_null(std::size_t no_locale_manage = 0) :
std::codecvt<wchar_t, char, std::mbstate_t>(no_locale_manage)
{}
virtual ~codecvt_null(){};
diff --git a/boost/archive/detail/iserializer.hpp b/boost/archive/detail/iserializer.hpp
index 6e02eec7c4..193e98a82e 100644
--- a/boost/archive/detail/iserializer.hpp
+++ b/boost/archive/detail/iserializer.hpp
@@ -605,7 +605,7 @@ template<class Archive, class T>
inline void load(Archive & ar, T &t){
// if this assertion trips. It means we're trying to load a
// const object with a compiler that doesn't have correct
- // funtion template ordering. On other compilers, this is
+ // function template ordering. On other compilers, this is
// handled below.
detail::check_const_loading< T >();
typedef
diff --git a/boost/archive/impl/archive_serializer_map.ipp b/boost/archive/impl/archive_serializer_map.ipp
index 8dabf0d08f..7f163ec407 100644
--- a/boost/archive/impl/archive_serializer_map.ipp
+++ b/boost/archive/impl/archive_serializer_map.ipp
@@ -47,6 +47,10 @@ archive_serializer_map<Archive>::insert(const basic_serializer * bs){
template<class Archive>
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
archive_serializer_map<Archive>::erase(const basic_serializer * bs){
+ BOOST_ASSERT(! boost::serialization::singleton<
+ extra_detail::map<Archive>
+ >::is_destroyed()
+ );
if(boost::serialization::singleton<
extra_detail::map<Archive>
>::is_destroyed())
diff --git a/boost/archive/impl/basic_binary_iprimitive.ipp b/boost/archive/impl/basic_binary_iprimitive.ipp
index 7082b003e7..bbe933ccf6 100644
--- a/boost/archive/impl/basic_binary_iprimitive.ipp
+++ b/boost/archive/impl/basic_binary_iprimitive.ipp
@@ -84,6 +84,7 @@ basic_binary_iprimitive<Archive, Elem, Tr>::init()
);
}
+#ifndef BOOST_NO_CWCHAR
template<class Archive, class Elem, class Tr>
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
basic_binary_iprimitive<Archive, Elem, Tr>::load(wchar_t * ws)
@@ -93,6 +94,7 @@ basic_binary_iprimitive<Archive, Elem, Tr>::load(wchar_t * ws)
load_binary(ws, l * sizeof(wchar_t) / sizeof(char));
ws[l] = L'\0';
}
+#endif
template<class Archive, class Elem, class Tr>
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
@@ -110,7 +112,6 @@ basic_binary_iprimitive<Archive, Elem, Tr>::load(std::string & s)
load_binary(&(*s.begin()), l);
}
-#ifndef BOOST_NO_CWCHAR
template<class Archive, class Elem, class Tr>
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
basic_binary_iprimitive<Archive, Elem, Tr>::load(char * s)
@@ -120,7 +121,6 @@ basic_binary_iprimitive<Archive, Elem, Tr>::load(char * s)
load_binary(s, l);
s[l] = '\0';
}
-#endif
#ifndef BOOST_NO_STD_WSTRING
template<class Archive, class Elem, class Tr>
diff --git a/boost/archive/impl/basic_binary_oprimitive.ipp b/boost/archive/impl/basic_binary_oprimitive.ipp
index 130831e4fb..7b042173a4 100644
--- a/boost/archive/impl/basic_binary_oprimitive.ipp
+++ b/boost/archive/impl/basic_binary_oprimitive.ipp
@@ -71,6 +71,7 @@ basic_binary_oprimitive<Archive, Elem, Tr>::save(const std::string &s)
}
#ifndef BOOST_NO_CWCHAR
+#ifndef BOOST_NO_INTRINSIC_WCHAR_T
template<class Archive, class Elem, class Tr>
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
basic_binary_oprimitive<Archive, Elem, Tr>::save(const wchar_t * ws)
@@ -91,6 +92,7 @@ basic_binary_oprimitive<Archive, Elem, Tr>::save(const std::wstring &ws)
save_binary(ws.data(), l * sizeof(wchar_t) / sizeof(char));
}
#endif
+#endif // BOOST_NO_CWCHAR
template<class Archive, class Elem, class Tr>
BOOST_ARCHIVE_OR_WARCHIVE_DECL
diff --git a/boost/archive/impl/text_wiarchive_impl.ipp b/boost/archive/impl/text_wiarchive_impl.ipp
index 12af2b9f12..e85625ac32 100644
--- a/boost/archive/impl/text_wiarchive_impl.ipp
+++ b/boost/archive/impl/text_wiarchive_impl.ipp
@@ -56,7 +56,7 @@ text_wiarchive_impl<Archive>::load(std::string &s)
s.resize(0);
s.reserve(size);
while(size-- > 0){
- int x = is.narrow(is.get(), '\0');
+ char x = is.narrow(is.get(), '\0');
s += x;
}
}
diff --git a/boost/archive/impl/xml_woarchive_impl.ipp b/boost/archive/impl/xml_woarchive_impl.ipp
index 58f92c9d92..01b1a052d5 100644
--- a/boost/archive/impl/xml_woarchive_impl.ipp
+++ b/boost/archive/impl/xml_woarchive_impl.ipp
@@ -17,7 +17,9 @@
#include <cstring> // strlen
#include <cstdlib> // mbtowc
+#ifndef BOOST_NO_CWCHAR
#include <cwchar> // wcslen
+#endif
#include <boost/config.hpp>
#if defined(BOOST_NO_STDC_NAMESPACE)
diff --git a/boost/archive/iterators/base64_from_binary.hpp b/boost/archive/iterators/base64_from_binary.hpp
index 00c4e10c10..ee84994439 100644
--- a/boost/archive/iterators/base64_from_binary.hpp
+++ b/boost/archive/iterators/base64_from_binary.hpp
@@ -41,7 +41,7 @@ template<class CharType>
struct from_6_bit {
typedef CharType result_type;
CharType operator()(CharType t) const{
- const char * lookup_table =
+ static const char * lookup_table =
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz"
"0123456789"
diff --git a/boost/archive/iterators/binary_from_base64.hpp b/boost/archive/iterators/binary_from_base64.hpp
index 2eb7828251..89b8f889da 100644
--- a/boost/archive/iterators/binary_from_base64.hpp
+++ b/boost/archive/iterators/binary_from_base64.hpp
@@ -37,7 +37,7 @@ template<class CharType>
struct to_6_bit {
typedef CharType result_type;
CharType operator()(CharType t) const{
- const signed char lookup_table[] = {
+ static const signed char lookup_table[] = {
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,
diff --git a/boost/archive/iterators/escape.hpp b/boost/archive/iterators/escape.hpp
index a1fee91420..103b31e0fe 100644
--- a/boost/archive/iterators/escape.hpp
+++ b/boost/archive/iterators/escape.hpp
@@ -102,7 +102,8 @@ public:
super_t(base),
m_bnext(NULL),
m_bend(NULL),
- m_full(false)
+ m_full(false),
+ m_current_value(0)
{
}
};
diff --git a/boost/archive/iterators/istream_iterator.hpp b/boost/archive/iterators/istream_iterator.hpp
index 9a1d555c10..a187f605e6 100644
--- a/boost/archive/iterators/istream_iterator.hpp
+++ b/boost/archive/iterators/istream_iterator.hpp
@@ -56,7 +56,7 @@ class istream_iterator :
//Access the value referred to
Elem dereference() const {
- return m_istream->peek();
+ return static_cast<Elem>(m_istream->peek());
}
void increment(){
@@ -75,14 +75,14 @@ public:
}
istream_iterator() :
- m_istream(NULL)
+ m_istream(NULL),
+ m_current_value(NULL)
{}
istream_iterator(const istream_iterator<Elem> & rhs) :
m_istream(rhs.m_istream),
m_current_value(rhs.m_current_value)
{}
-
};
} // namespace iterators
diff --git a/boost/archive/iterators/mb_from_wchar.hpp b/boost/archive/iterators/mb_from_wchar.hpp
index b6dc9b2151..05df71c258 100644
--- a/boost/archive/iterators/mb_from_wchar.hpp
+++ b/boost/archive/iterators/mb_from_wchar.hpp
@@ -18,8 +18,9 @@
#include <boost/assert.hpp>
#include <cstddef> // size_t
+#ifndef BOOST_NO_CWCHAR
#include <cwchar> // mbstate_t
-
+#endif
#include <boost/config.hpp>
#if defined(BOOST_NO_STDC_NAMESPACE)
namespace std{
diff --git a/boost/archive/iterators/transform_width.hpp b/boost/archive/iterators/transform_width.hpp
index d042560e29..09c050a927 100644
--- a/boost/archive/iterators/transform_width.hpp
+++ b/boost/archive/iterators/transform_width.hpp
@@ -111,6 +111,7 @@ public:
transform_width(T start) :
super_t(Base(static_cast< T >(start))),
m_buffer_out_full(false),
+ m_buffer_out(0),
// To disable GCC warning, but not truly necessary
//(m_buffer_in will be initialized later before being
//used because m_remaining_bits == 0)
diff --git a/boost/archive/iterators/wchar_from_mb.hpp b/boost/archive/iterators/wchar_from_mb.hpp
index 52a44bdc79..2af8f6401f 100644
--- a/boost/archive/iterators/wchar_from_mb.hpp
+++ b/boost/archive/iterators/wchar_from_mb.hpp
@@ -19,7 +19,9 @@
#include <boost/assert.hpp>
#include <cctype>
#include <cstddef> // size_t
+#ifndef BOOST_NO_CWCHAR
#include <cwchar> // mbstate_t
+#endif
#include <algorithm> // copy
#include <boost/config.hpp>
diff --git a/boost/archive/wcslen.hpp b/boost/archive/wcslen.hpp
index 2a3d6351d4..0b60004f09 100644
--- a/boost/archive/wcslen.hpp
+++ b/boost/archive/wcslen.hpp
@@ -44,7 +44,9 @@ inline std::size_t wcslen(const wchar_t * ws)
#else
+#ifndef BOOST_NO_CWCHAR
#include <cwchar>
+#endif
#ifdef BOOST_NO_STDC_NAMESPACE
namespace std{ using ::wcslen; }
#endif