fix support for BOOST 1_71

This commit is contained in:
Artem Pavlenko 2019-10-21 16:42:58 +01:00
parent fdf60044c3
commit 0b4f3dc497
10 changed files with 45 additions and 12 deletions

View file

@ -63,6 +63,17 @@ struct end_container<mapnik::feature_impl const>
}
};
template <>
struct transform_attribute<const mapnik::feature_impl, const mapnik::feature_impl &, boost::spirit::karma::domain, void>
: detail::transform_attribute_base<mapnik::feature_impl const, mapnik::feature_impl const&, boost::spirit::karma::domain>
{};
template <>
struct transform_attribute<const boost::fusion::cons<const mapnik::feature_impl &, boost::fusion::nil_>, const mapnik::feature_impl &,
boost::spirit::karma::domain, void>
: detail::transform_attribute_base<const boost::fusion::cons<const mapnik::feature_impl &, boost::fusion::nil_>, mapnik::feature_impl const&, boost::spirit::karma::domain>
{};
}}}
namespace mapnik { namespace json {

View file

@ -60,8 +60,8 @@ struct extract_string
};
template <typename OutputIterator, typename KeyValueStore>
struct properties_generator_grammar : karma::grammar<OutputIterator, KeyValueStore const&()>
struct properties_generator_grammar
: karma::grammar<OutputIterator, KeyValueStore const&()>
{
using pair_type = std::tuple<std::string, mapnik::value>;
properties_generator_grammar();

View file

@ -141,7 +141,7 @@ struct coordinate_policy : karma::real_policies<T>
template <typename OutputIterator, typename Path>
struct svg_path_generator :
karma::grammar<OutputIterator, Path const& ()>
karma::grammar<OutputIterator, Path()>
{
using path_type = Path;
@ -149,12 +149,12 @@ struct svg_path_generator :
svg_path_generator();
// rules
karma::rule<OutputIterator, path_type const& ()> svg;
karma::rule<OutputIterator, path_type const& ()> point;
karma::rule<OutputIterator, path_type const& ()> linestring;
karma::rule<OutputIterator, path_type const& ()> polygon;
karma::rule<OutputIterator, coordinate_type ()> svg_point;
karma::rule<OutputIterator, path_type const& ()> svg_path;
karma::rule<OutputIterator, path_type()> svg;
karma::rule<OutputIterator, path_type()> point;
karma::rule<OutputIterator, path_type()> linestring;
karma::rule<OutputIterator, path_type()> polygon;
karma::rule<OutputIterator, coordinate_type()> svg_point;
karma::rule<OutputIterator, path_type()> svg_path;
// phoenix functions
phoenix::function<svg_detail::get_type<path_type> > _type;

View file

@ -30,7 +30,9 @@ using context_type = x3::phrase_parse_context<x3::ascii::space_type>::type;
BOOST_SPIRIT_INSTANTIATE(css_color_grammar_type, iterator_type, context_type);
#if BOOST_VERSION < 107000
template bool parse_rule<iterator_type, context_type, mapnik::filter::color_to_alpha>
(css_color_grammar_type, iterator_type&, iterator_type const&, context_type const&, mapnik::filter::color_to_alpha&);
#endif
}}

View file

@ -27,6 +27,11 @@ namespace mapnik { namespace json { namespace grammar {
BOOST_SPIRIT_INSTANTIATE(feature_grammar_type, iterator_type, feature_context_type);
BOOST_SPIRIT_INSTANTIATE(geometry_grammar_type, iterator_type, phrase_parse_context_type);
#if BOOST_VERSION >= 107000
BOOST_SPIRIT_INSTANTIATE(feature_grammar_type, iterator_type, feature_context_const_type);
#else
BOOST_SPIRIT_INSTANTIATE_UNUSED(feature_grammar_type, iterator_type, feature_context_const_type);
#endif
}}}

View file

@ -30,8 +30,10 @@ BOOST_SPIRIT_INSTANTIATE(generic_json_grammar_type, iterator_type, context_type)
BOOST_SPIRIT_INSTANTIATE(generic_json_grammar_type, iterator_type, feature_context_type);
BOOST_SPIRIT_INSTANTIATE(generic_json_grammar_type, iterator_type, feature_context_const_type);
#if BOOST_VERSION < 107000
BOOST_SPIRIT_INSTANTIATE_UNUSED(generic_json_grammar_type, iterator_type, phrase_parse_context_type);
BOOST_SPIRIT_INSTANTIATE_UNUSED(generic_json_grammar_type, iterator_type, feature_context_type);
BOOST_SPIRIT_INSTANTIATE_UNUSED(generic_json_grammar_type, iterator_type, feature_context_const_type);
#endif
}}}

View file

@ -29,13 +29,17 @@ namespace mapnik { namespace json { namespace grammar {
BOOST_SPIRIT_INSTANTIATE(geojson_grammar_type, iterator_type, context_type);
BOOST_SPIRIT_INSTANTIATE(geojson_key_value_type, iterator_type, context_type);
BOOST_SPIRIT_INSTANTIATE(geojson_grammar_type, iterator_type, extract_bounding_boxes_context_type);
#if BOOST_VERSION >= 107000
BOOST_SPIRIT_INSTANTIATE(geojson_grammar_type, iterator_type, extract_bounding_boxes_reverse_context_type);
BOOST_SPIRIT_INSTANTIATE(geojson_grammar_type, iterator_type, extract_bounding_boxes_context_type_f);
BOOST_SPIRIT_INSTANTIATE(geojson_grammar_type, iterator_type, extract_bounding_boxes_reverse_context_type_f);
#else
BOOST_SPIRIT_INSTANTIATE_UNUSED(geojson_grammar_type, iterator_type, extract_bounding_boxes_context_type);
BOOST_SPIRIT_INSTANTIATE_UNUSED(geojson_grammar_type, iterator_type, extract_bounding_boxes_reverse_context_type);
BOOST_SPIRIT_INSTANTIATE_UNUSED(geojson_grammar_type, iterator_type, extract_bounding_boxes_context_type_f);
BOOST_SPIRIT_INSTANTIATE_UNUSED(geojson_grammar_type, iterator_type, extract_bounding_boxes_reverse_context_type_f);
#endif
}}}

View file

@ -31,14 +31,16 @@ BOOST_SPIRIT_INSTANTIATE(positions_grammar_type, iterator_type, context_type);
BOOST_SPIRIT_INSTANTIATE(positions_grammar_type, iterator_type, feature_context_type);
BOOST_SPIRIT_INSTANTIATE(positions_grammar_type, iterator_type, feature_context_const_type);
#if BOOST_VERSION >=107000
BOOST_SPIRIT_INSTANTIATE(positions_grammar_type, iterator_type, extract_bounding_boxes_context_type);
BOOST_SPIRIT_INSTANTIATE(positions_grammar_type, iterator_type, extract_bounding_boxes_reverse_context_type);
BOOST_SPIRIT_INSTANTIATE(positions_grammar_type, iterator_type, extract_bounding_boxes_context_type_f);
BOOST_SPIRIT_INSTANTIATE(positions_grammar_type, iterator_type, extract_bounding_boxes_reverse_context_type_f);
#else
BOOST_SPIRIT_INSTANTIATE_UNUSED(positions_grammar_type, iterator_type, extract_bounding_boxes_context_type);
BOOST_SPIRIT_INSTANTIATE_UNUSED(positions_grammar_type, iterator_type, extract_bounding_boxes_reverse_context_type);
BOOST_SPIRIT_INSTANTIATE_UNUSED(positions_grammar_type, iterator_type, extract_bounding_boxes_context_type_f);
BOOST_SPIRIT_INSTANTIATE_UNUSED(positions_grammar_type, iterator_type, extract_bounding_boxes_reverse_context_type_f);
#endif
}}}

View file

@ -35,6 +35,7 @@ BOOST_SPIRIT_INSTANTIATE(unicode_string_grammar_type, iterator_type, extract_bou
BOOST_SPIRIT_INSTANTIATE(unicode_string_grammar_type, iterator_type, extract_bounding_boxes_context_type_f);
BOOST_SPIRIT_INSTANTIATE(unicode_string_grammar_type, iterator_type, extract_bounding_boxes_reverse_context_type_f);
#if BOOST_VERSION < 107000
BOOST_SPIRIT_INSTANTIATE_UNUSED(unicode_string_grammar_type, iterator_type, phrase_parse_context_type);
BOOST_SPIRIT_INSTANTIATE_UNUSED(unicode_string_grammar_type, iterator_type, feature_context_type);
BOOST_SPIRIT_INSTANTIATE_UNUSED(unicode_string_grammar_type, iterator_type, feature_context_const_type);
@ -42,5 +43,6 @@ BOOST_SPIRIT_INSTANTIATE_UNUSED(unicode_string_grammar_type, iterator_type, extr
BOOST_SPIRIT_INSTANTIATE_UNUSED(unicode_string_grammar_type, iterator_type, extract_bounding_boxes_reverse_context_type);
BOOST_SPIRIT_INSTANTIATE_UNUSED(unicode_string_grammar_type, iterator_type, extract_bounding_boxes_context_type_f);
BOOST_SPIRIT_INSTANTIATE_UNUSED(unicode_string_grammar_type, iterator_type, extract_bounding_boxes_reverse_context_type_f);
#endif
}}}

View file

@ -25,7 +25,12 @@
namespace mapnik { namespace svg { namespace grammar {
#if BOOST_VERSION >= 107000
BOOST_SPIRIT_INSTANTIATE(svg_path_grammar_type, iterator_type, svg_parse_context_type);
BOOST_SPIRIT_INSTANTIATE(svg_points_grammar_type, iterator_type, svg_parse_context_type);
#else
BOOST_SPIRIT_INSTANTIATE_UNUSED(svg_path_grammar_type, iterator_type, svg_parse_context_type);
BOOST_SPIRIT_INSTANTIATE_UNUSED(svg_points_grammar_type, iterator_type, svg_parse_context_type);
#endif
}}}