// implementation of basic_text_iprimitive overrides for the combination
// of template parameters used to implement a text_iprimitive
+#ifndef BOOST_HEADER_GUARD_ARCHIVE_SERIALIZER_MAP_IPP
+#define BOOST_HEADER_GUARD_ARCHIVE_SERIALIZER_MAP_IPP
+
#include <boost/config.hpp>
#include <boost/archive/detail/archive_serializer_map.hpp>
#include <boost/archive/detail/basic_serializer_map.hpp>
} // namespace detail
} // namespace archive
} // namespace boost
+
+#endif // BOOST_HEADER_GUARD_ARCHIVE_SERIALIZER_MAP_IPP
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// remove_whitespace.hpp
-// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
+// (C) Copyright 2002, 2010 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//#endif // BOOST_WORKAROUND
-namespace { // anonymous
-
template<class CharType>
struct remove_whitespace_predicate;
};
#endif
-} // namespace anonymous
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// convert base64 file data (including whitespace and padding) to binary
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// text_oarchive.hpp
-// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
+// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <boost/config.hpp>
#if defined(BOOST_NO_STDC_NAMESPACE)
-namespace std{
- using ::size_t;
+namespace std{
+ using ::size_t;
} // namespace std
#endif
# pragma warning(disable : 4511 4512)
#endif
-namespace boost {
+namespace boost {
namespace archive {
template<class Archive>
-class text_oarchive_impl :
+class text_oarchive_impl :
/* protected ? */ public basic_text_oprimitive<std::ostream>,
public basic_text_oarchive<Archive>
{
basic_text_oprimitive<std::ostream>::save(t);
}
void save(const version_type & t){
- save(static_cast<const unsigned int>(t));
+ save(static_cast<unsigned int>(t));
}
void save(const boost::serialization::item_version_type & t){
- save(static_cast<const unsigned int>(t));
+ save(static_cast<unsigned int>(t));
}
- BOOST_ARCHIVE_DECL(void)
+ BOOST_ARCHIVE_DECL(void)
save(const char * t);
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
- BOOST_ARCHIVE_DECL(void)
+ BOOST_ARCHIVE_DECL(void)
save(const wchar_t * t);
#endif
- BOOST_ARCHIVE_DECL(void)
+ BOOST_ARCHIVE_DECL(void)
save(const std::string &s);
#ifndef BOOST_NO_STD_WSTRING
- BOOST_ARCHIVE_DECL(void)
+ BOOST_ARCHIVE_DECL(void)
save(const std::wstring &ws);
#endif
- BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY())
+ BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY())
text_oarchive_impl(std::ostream & os, unsigned int flags);
// don't import inline definitions! leave this as a reminder.
- //BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY())
+ //BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY())
~text_oarchive_impl(){};
public:
- BOOST_ARCHIVE_DECL(void)
+ BOOST_ARCHIVE_DECL(void)
save_binary(const void *address, std::size_t count);
};
// do not derive from this class. If you want to extend this functionality
// via inhertance, derived from text_oarchive_impl instead. This will
// preserve correct static polymorphism.
-class text_oarchive :
+class text_oarchive :
public text_oarchive_impl<text_oarchive>
{
public:
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// xml_oarchive.hpp
-// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
+// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <cstddef> // size_t
#include <boost/config.hpp>
#if defined(BOOST_NO_STDC_NAMESPACE)
-namespace std{
- using ::size_t;
+namespace std{
+ using ::size_t;
} // namespace std
#endif
namespace archive {
template<class Archive>
-class xml_oarchive_impl :
+class xml_oarchive_impl :
public basic_text_oprimitive<std::ostream>,
public basic_xml_oarchive<Archive>
{
void save(const T & t){
basic_text_oprimitive<std::ostream>::save(t);
}
- void
+ void
save(const version_type & t){
- save(static_cast<const unsigned int>(t));
+ save(static_cast<unsigned int>(t));
}
- void
+ void
save(const boost::serialization::item_version_type & t){
- save(static_cast<const unsigned int>(t));
+ save(static_cast<unsigned int>(t));
}
- BOOST_ARCHIVE_DECL(void)
+ BOOST_ARCHIVE_DECL(void)
save(const char * t);
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
BOOST_ARCHIVE_DECL(void)
BOOST_ARCHIVE_DECL(void)
save(const std::wstring &ws);
#endif
- BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY())
+ BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY())
xml_oarchive_impl(std::ostream & os, unsigned int flags);
~xml_oarchive_impl(){}
public:
#else
this->basic_text_oprimitive::save_binary(
#endif
- address,
+ address,
count
);
this->indent_next = true;
// do not derive from this class. If you want to extend this functionality
// via inhertance, derived from xml_oarchive_impl instead. This will
// preserve correct static polymorphism.
-class xml_oarchive :
+class xml_oarchive :
public xml_oarchive_impl<xml_oarchive>
{
public:
namespace boost { namespace property_tree { namespace json_parser
{
+ namespace
+ {
+ bool is_ascii (const char)
+ {
+ return true;
+ }
+
+ template <typename Ch>
+ bool is_ascii (const Ch c)
+ {
+ return c <= 0xFF;
+ }
+ }
+
+
// Create necessary escape sequences from illegal characters
template<class Ch>
// We escape everything outside ASCII, because this code can't
// handle high unicode characters.
if (*b == 0x20 || *b == 0x21 || (*b >= 0x23 && *b <= 0x2E) ||
- (*b >= 0x30 && *b <= 0x5B) || (*b >= 0x5D && *b <= 0xFF))
+ (*b >= 0x30 && *b <= 0x5B) || (*b >= 0x5D && is_ascii(*b)))
result += *b;
else if (*b == Ch('\b')) result += Ch('\\'), result += Ch('b');
else if (*b == Ch('\f')) result += Ch('\\'), result += Ch('f');
template<typename Func, unsigned ... indices, typename ... Args>
R m_invoke(void *, Func &func, unsigned_meta_array<indices...>, std::tuple<Args...> args) const
{
+ (void)args;
func(std::get<indices>(args)...);
return R();
}
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__)
# pragma message ("Warning: This header is deprecated. Please use: boost/spirit/include/classic_actions.hpp")
#elif defined(__GNUC__) || defined(__HP_aCC) || defined(__SUNPRO_CC) || defined(__IBMCPP__)
-# warning "This header is deprecated. Please use: boost/spirit/include/classic_actions.hpp"
+//# warning "This header is deprecated. Please use: boost/spirit/include/classic_actions.hpp"
#endif
#endif
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__)
# pragma message ("Warning: This header is deprecated. Please use: boost/spirit/include/classic_operators.hpp")
#elif defined(__GNUC__) || defined(__HP_aCC) || defined(__SUNPRO_CC) || defined(__IBMCPP__)
-# warning "This header is deprecated. Please use: boost/spirit/include/classic_operators.hpp"
+//# warning "This header is deprecated. Please use: boost/spirit/include/classic_operators.hpp"
#endif
#endif
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__)
# pragma message ("Warning: This header is deprecated. Please use: boost/spirit/include/classic_rule.hpp")
#elif defined(__GNUC__) || defined(__HP_aCC) || defined(__SUNPRO_CC) || defined(__IBMCPP__)
-# warning "This header is deprecated. Please use: boost/spirit/include/classic_rule.hpp"
+//# warning "This header is deprecated. Please use: boost/spirit/include/classic_rule.hpp"
#endif
#endif
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__)
# pragma message ("Warning: This header is deprecated. Please use: boost/spirit/include/classic_numerics.hpp")
#elif defined(__GNUC__) || defined(__HP_aCC) || defined(__SUNPRO_CC) || defined(__IBMCPP__)
-# warning "This header is deprecated. Please use: boost/spirit/include/classic_numerics.hpp"
+//# warning "This header is deprecated. Please use: boost/spirit/include/classic_numerics.hpp"
#endif
#endif
// attempt to insert serializer into it's map
const std::pair<map_type::iterator, bool> result =
m_map.insert(bs);
+ (void)result;
// the following is commented out - rather than being just
// deleted as a reminder not to try this.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+#ifndef __STDC_CONSTANT_MACROS
#define __STDC_CONSTANT_MACROS
+#endif
+
#include <boost/thread/once.hpp>
#include <boost/assert.hpp>
#include <pthread.h>