diff --git a/include/mapnik/expression_evaluator.hpp b/include/mapnik/expression_evaluator.hpp index 1008be4ee..15c85c97b 100644 --- a/include/mapnik/expression_evaluator.hpp +++ b/include/mapnik/expression_evaluator.hpp @@ -47,9 +47,29 @@ struct evaluate : boost::static_visitor explicit evaluate(feature_type const& f) : feature_(f) {} - value_type operator() (value_type x) const + value_integer operator() (value_integer val) const { - return x; + return val; + } + + value_double operator() (value_double val) const + { + return val; + } + + value_bool operator() (value_bool val) const + { + return val; + } + + value_null operator() (value_null val) const + { + return val; + } + + value_unicode_string const& operator() (value_unicode_string const& str) const + { + return str; } value_type operator() (attribute const& attr) const diff --git a/include/mapnik/expression_node_types.hpp b/include/mapnik/expression_node_types.hpp index 6c1af39e6..53a998453 100644 --- a/include/mapnik/expression_node_types.hpp +++ b/include/mapnik/expression_node_types.hpp @@ -24,24 +24,17 @@ #define MAPNIK_EXPRESSION_NODE_TYPES_HPP // mapnik -//#include -//#include +#include +#include +#include // boost -#include - -namespace boost { template class recursive_wrapper; } +#include +#include namespace mapnik { -struct attribute; -struct geometry_type_attribute; -namespace value_adl_barrier { - class value; -} -using value_adl_barrier::value; - namespace tags { struct negate { @@ -174,8 +167,12 @@ struct regex_replace_node; typedef mapnik::value value_type; -typedef boost::variant < -value_type, +typedef boost::mpl::vector24< +value_null, +value_bool, +value_integer, +value_double, +value_unicode_string, attribute, geometry_type_attribute, boost::recursive_wrapper >, @@ -195,7 +192,9 @@ boost::recursive_wrapper >, boost::recursive_wrapper >, boost::recursive_wrapper, boost::recursive_wrapper -> expr_node; +>::type expr_types; + +typedef boost::make_recursive_variant_over::type expr_node; }