From 5eb6c089c351d364159f41ff8b4bd5261ff6d393 Mon Sep 17 00:00:00 2001 From: artemp Date: Thu, 11 Aug 2016 15:26:10 +0100 Subject: [PATCH] transform_expression - fix compilation by addinhg `move_to` specialization --- .../transform_expression_grammar_x3_def.hpp | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/include/mapnik/transform_expression_grammar_x3_def.hpp b/include/mapnik/transform_expression_grammar_x3_def.hpp index 0f85ca2b6..602f30aee 100644 --- a/include/mapnik/transform_expression_grammar_x3_def.hpp +++ b/include/mapnik/transform_expression_grammar_x3_def.hpp @@ -66,6 +66,32 @@ BOOST_FUSION_ADAPT_STRUCT(mapnik::skewY_node, (mapnik::expr_node, angle_)) +// Following specializations are required to avoid trasferring mapnik::skewX/Y nodes as underlying expressions +// +// template +// inline void +// move_to_plain(Source&& src, Dest& dest, mpl::true_) // src is a single-element tuple +// { +// dest = std::move(fusion::front(src)); +// } +// which will fail to compile with latest (more strict) `mapbox::variant` (boost_1_61) + +namespace boost { namespace spirit { namespace x3 { namespace traits { +template <> +inline void move_to(mapnik::skewX_node && src, mapnik::detail::transform_node& dst) +{ + dst = std::move(src); +} + +template <> +inline void move_to(mapnik::skewY_node && src, mapnik::detail::transform_node& dst) +{ + dst = std::move(src); +} + +}}}} + + namespace mapnik { namespace grammar { namespace x3 = boost::spirit::x3;