// 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
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');
//! \cond internal
namespace internal
{
+ namespace
+ {
+ inline
+ bool beyond_ascii (const char)
+ {
+ return false;
+ }
+
+ template <typename Ch>
+ inline
+ bool beyond_ascii (const Ch c)
+ {
+ return (c > 255);
+ }
+ }
+
+
// Struct that contains lookup tables for the parser
// It must be a template to allow correct linking (because it has static data members, which are defined in a header file).
inline size_t get_index(const Ch c)
{
// If not ASCII char, its sematic is same as plain 'z'
- if (c > 255)
+ if (beyond_ascii(c))
{
return 'z';
}
#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