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

@@ -90,7 +90,7 @@ namespace boost { namespace spirit { namespace karma { namespace detail
component; // suppresses warning: C4100: 'component' : unreferenced formal parameter
#endif
return call(component, sink, ctx, d, attr
, spirit::traits::not_is_variant<Attribute, karma::domain>());
, spirit::traits::not_is_variant_or_variant_in_optional<Attribute, karma::domain>());
}
template <typename OutputIterator, typename Context, typename Delimiter>

View File

@@ -44,22 +44,6 @@ namespace boost { namespace spirit { namespace karma
// Karma only, no post() and no fail() required
};
// reference types need special handling
template <typename Exposed, typename Transformed>
struct transform_attribute<Exposed&, Transformed>
: transform_attribute<Exposed, Transformed>
{};
template <typename Exposed, typename Transformed>
struct transform_attribute<Exposed const&, Transformed>
: transform_attribute<Exposed const, Transformed>
{};
template <typename Attribute>
struct transform_attribute<Attribute const&, Attribute>
: transform_attribute<Attribute const, Attribute>
{};
// unused_type needs some special handling as well
template <>
struct transform_attribute<unused_type, unused_type>
@@ -73,16 +57,6 @@ namespace boost { namespace spirit { namespace karma
: transform_attribute<unused_type, unused_type>
{};
template <typename Attribute>
struct transform_attribute<unused_type, Attribute>
: transform_attribute<unused_type, unused_type>
{};
template <typename Attribute>
struct transform_attribute<unused_type const, Attribute>
: transform_attribute<unused_type, unused_type>
{};
template <typename Attribute>
struct transform_attribute<Attribute, unused_type>
: transform_attribute<unused_type, unused_type>
@@ -95,14 +69,12 @@ namespace boost { namespace spirit { namespace karma
}}}
///////////////////////////////////////////////////////////////////////////////
namespace boost { namespace spirit { namespace traits
namespace boost { namespace spirit { namespace traits { namespace detail
{
template <typename Exposed, typename Transformed>
struct transform_attribute<Exposed, Transformed, karma::domain>
struct transform_attribute_base<Exposed, Transformed, karma::domain>
: karma::transform_attribute<Exposed, Transformed>
{};
}}}
}}}}
#endif

View File

@@ -44,40 +44,45 @@ namespace boost { namespace spirit { namespace traits
}
// This is the default case: the plain attribute values
template <typename Attribute, typename Exposed, typename Enable/*= void*/>
struct extract_from_attribute
template <typename Attribute, typename Exposed
, bool IsOneElemSeq = traits::one_element_sequence<Attribute>::value>
struct extract_from_attribute_base
{
typedef typename traits::one_element_sequence<Attribute>::type
is_one_element_sequence;
typedef typename mpl::eval_if<
is_one_element_sequence
, detail::value_at_c<Attribute, 0>
, mpl::identity<Attribute const&>
>::type type;
typedef Attribute const& type;
template <typename Context>
static type call(Attribute const& attr, Context&, mpl::false_)
static type call(Attribute const& attr, Context&)
{
return attr;
}
};
// This handles the case where the attribute is a single element fusion
// sequence. We silently extract the only element and treat it as the
// attribute to generate output from.
template <typename Context>
static type call(Attribute const& attr, Context& ctx, mpl::true_)
{
return extract_from<Exposed>(fusion::at_c<0>(attr), ctx);
}
// This handles the case where the attribute is a single element fusion
// sequence. We silently extract the only element and treat it as the
// attribute to generate output from.
template <typename Attribute, typename Exposed>
struct extract_from_attribute_base<Attribute, Exposed, true>
{
typedef typename remove_const<
typename remove_reference<
typename fusion::result_of::at_c<Attribute, 0>::type
>::type
>::type elem_type;
typedef typename result_of::extract_from<Exposed, elem_type>::type type;
template <typename Context>
static type call(Attribute const& attr, Context& ctx)
{
return call(attr, ctx, is_one_element_sequence());
return extract_from<Exposed>(fusion::at_c<0>(attr), ctx);
}
};
template <typename Attribute, typename Exposed, typename Enable/*= void*/>
struct extract_from_attribute
: extract_from_attribute_base<Attribute, Exposed>
{};
// This handles optional attributes.
template <typename Attribute, typename Exposed>
struct extract_from_attribute<boost::optional<Attribute>, Exposed>

View File

@@ -12,6 +12,7 @@
#include <boost/spirit/home/support/unused.hpp>
#include <boost/iterator/iterator_facade.hpp>
#include <iterator> // for std::iterator_traits
///////////////////////////////////////////////////////////////////////////////
namespace boost { namespace spirit { namespace karma { namespace detail
@@ -23,13 +24,13 @@ namespace boost { namespace spirit { namespace karma { namespace detail
class indirect_iterator
: public boost::iterator_facade<
indirect_iterator<Iterator>
, typename boost::detail::iterator_traits<Iterator>::value_type
, typename std::iterator_traits<Iterator>::value_type
, boost::forward_traversal_tag
, typename boost::detail::iterator_traits<Iterator>::reference>
, typename std::iterator_traits<Iterator>::reference>
{
typedef typename boost::detail::iterator_traits<Iterator>::value_type
typedef typename std::iterator_traits<Iterator>::value_type
base_value_type;
typedef typename boost::detail::iterator_traits<Iterator>::reference
typedef typename std::iterator_traits<Iterator>::reference
base_reference_type;
typedef boost::iterator_facade<

View File

@@ -191,7 +191,7 @@ namespace boost { namespace spirit { namespace karma { namespace detail
// wchar_t is only 16-bits on Windows. If BOOST_SPIRIT_UNICODE is
// defined, the character type is 32-bits wide so we need to make
// sure the buffer is at least that wide.
#if defined(BOOST_MSVC) && defined(BOOST_SPIRIT_UNICODE)
#if (defined(_WIN32) || defined(__CYGWIN__)) && defined(BOOST_SPIRIT_UNICODE)
typedef spirit::char_encoding::unicode::char_type buffer_char_type;
#else
typedef wchar_t buffer_char_type;
@@ -304,7 +304,7 @@ namespace boost { namespace spirit { namespace karma { namespace detail
struct no_buffering_policy
{
no_buffering_policy() {}
no_buffering_policy(no_counting_policy const&) {}
no_buffering_policy(no_buffering_policy const&) {}
template <typename T>
bool output(T const& /*value*/)