update boost on linux

This commit is contained in:
Bassem Girgis
2019-08-10 16:06:25 -05:00
parent 76ad52be58
commit 861b918727
5363 changed files with 483306 additions and 116507 deletions

View File

@@ -44,13 +44,15 @@ namespace boost { namespace spirit { namespace detail
inline short fast_string::tag() const
{
return (int(buff[small_string_size-2]) << 8) + (unsigned char)buff[small_string_size-1];
boost::int16_t tmp;
std::memcpy(&tmp, &buff[small_string_size-2], sizeof(tmp));
return tmp;
}
inline void fast_string::tag(short tag)
{
buff[small_string_size-2] = tag >> 8;
buff[small_string_size-1] = tag & 0xff;
boost::int16_t tmp = tag;
std::memcpy(&buff[small_string_size-2], &tmp, sizeof(tmp));
}
inline bool fast_string::is_heap_allocated() const
@@ -77,7 +79,7 @@ namespace boost { namespace spirit { namespace detail
template <typename Iterator>
inline void fast_string::construct(Iterator f, Iterator l)
{
unsigned const size = l-f;
std::size_t const size = static_cast<std::size_t>(l-f);
char* str;
if (size < max_string_len)
{
@@ -931,11 +933,11 @@ namespace boost { namespace spirit
return *this;
}
inline utree& utree::operator=(any_ptr const& p)
inline utree& utree::operator=(any_ptr const& p_)
{
free();
v.p = p.p;
v.i = p.i;
v.p = p_.p;
v.i = p_.i;
set_type(type::any_type);
return *this;
}

View File

@@ -535,7 +535,14 @@ namespace boost { namespace spirit
BOOST_SPIRIT_UTREE_CREATE_INTEGRAL_FUNCTION(bitxor_, a^b)
BOOST_SPIRIT_UTREE_CREATE_INTEGRAL_FUNCTION(shift_left, a<<b)
BOOST_SPIRIT_UTREE_CREATE_INTEGRAL_FUNCTION(shift_right, a>>b)
#if defined(__GNUC__) && (__GNUC__ >= 7)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wbool-operation" // '~' on an expression of type bool
#endif
BOOST_SPIRIT_UTREE_CREATE_INTEGRAL_FUNCTION(invert, ~a)
#if defined(__GNUC__) && (__GNUC__ >= 7)
# pragma GCC diagnostic pop
#endif
inline utree operator&&(utree const& a, utree const& b)
{

View File

@@ -29,6 +29,7 @@
#include <boost/utility/enable_if.hpp>
#include <boost/utility/result_of.hpp>
#include <boost/ref.hpp>
#include <boost/config.hpp>
#include <boost/spirit/home/support/utree/detail/utree_detail1.hpp>
@@ -43,7 +44,7 @@ namespace boost { namespace spirit
{
//[utree_exceptions
/*` All exceptions thrown by utree are derived from utree_exception. */
struct utree_exception : std::exception {};
struct BOOST_SYMBOL_VISIBLE utree_exception : std::exception {};
/*`The `bad_type_exception` is thrown whenever somebody calls a member
function, which applies to certain stored utree_type's only, but this
@@ -143,9 +144,9 @@ namespace boost { namespace spirit
msg = oss.str();
}
virtual ~bad_type_exception() throw() {}
virtual ~bad_type_exception() BOOST_NOEXCEPT_OR_NOTHROW {}
virtual char const* what() const throw()
virtual char const* what() const BOOST_NOEXCEPT_OR_NOTHROW
{ return msg.c_str(); }
};
@@ -155,9 +156,9 @@ namespace boost { namespace spirit
empty_exception(char const* error) : msg(error) {}
virtual ~empty_exception() throw() {}
virtual ~empty_exception() BOOST_NOEXCEPT_OR_NOTHROW {}
virtual char const* what() const throw()
virtual char const* what() const BOOST_NOEXCEPT_OR_NOTHROW
{ return msg; }
};

View File

@@ -1149,26 +1149,26 @@ namespace boost { namespace spirit { namespace traits
template <>
struct extract_from_container<utree, utf8_symbol_type>
{
typedef std::string type;
typedef utf8_symbol_type type;
template <typename Context>
static type call(utree const& t, Context&)
{
utf8_symbol_range_type r = detail::get_or_deref<utf8_symbol_range_type>(t);
return std::string(traits::begin(r), traits::end(r));
return type(traits::begin(r), traits::end(r));
}
};
template <>
struct extract_from_container<utree, utf8_string_type>
{
typedef std::string type;
typedef utf8_string_type type;
template <typename Context>
static type call(utree const& t, Context&)
{
utf8_string_range_type r = detail::get_or_deref<utf8_string_range_type>(t);
return std::string(traits::begin(r), traits::end(r));
return type(traits::begin(r), traits::end(r));
}
};
@@ -1264,24 +1264,24 @@ namespace boost { namespace spirit { namespace traits
template <>
struct transform_attribute<utree const, utf8_string_type, karma::domain>
{
typedef std::string type;
typedef utf8_string_type type;
static type pre(utree const& t)
{
utf8_string_range_type r = detail::get_or_deref<utf8_string_range_type>(t);
return std::string(traits::begin(r), traits::end(r));
return type(traits::begin(r), traits::end(r));
}
};
template <>
struct transform_attribute<utree const, utf8_symbol_type, karma::domain>
{
typedef std::string type;
typedef utf8_symbol_type type;
static type pre(utree const& t)
{
utf8_symbol_range_type r = detail::get_or_deref<utf8_symbol_range_type>(t);
return std::string(traits::begin(r), traits::end(r));
return type(traits::begin(r), traits::end(r));
}
};