From cc78a5de788d6e30c21fccfa1a505c6d01eee5df Mon Sep 17 00:00:00 2001 From: Artem Pavlenko Date: Tue, 12 May 2020 12:14:18 +0100 Subject: [PATCH] Fix for boost < 1.70.0 (ref #4143) --- include/mapnik/json/feature_generator_grammar.hpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/include/mapnik/json/feature_generator_grammar.hpp b/include/mapnik/json/feature_generator_grammar.hpp index 5783e5344..5df0cf938 100644 --- a/include/mapnik/json/feature_generator_grammar.hpp +++ b/include/mapnik/json/feature_generator_grammar.hpp @@ -91,15 +91,23 @@ BOOST_FUSION_ADAPT_ADT( (mapnik::kv_store const, mapnik::kv_store const, mapnik::kv_store(obj), /**/)) namespace mapnik { namespace json { +namespace detail { +template +#if BOOST_VERSION >= 107000 +struct attribute_type { using type = T();}; +#else +struct attribute_type { using type = T const&();}; +#endif +} namespace karma = boost::spirit::karma; template struct feature_generator_grammar : - karma::grammar + karma::grammar::type> { feature_generator_grammar(); - karma::rule feature; + karma::rule::type> feature; geometry_generator_grammar> geometry; properties_generator_grammar properties; };