diff --git a/include/mapnik/geometry.hpp b/include/mapnik/geometry.hpp index 95f089628..970f8ddcf 100644 --- a/include/mapnik/geometry.hpp +++ b/include/mapnik/geometry.hpp @@ -129,15 +129,29 @@ struct geometry_collection; struct geometry_empty {}; + template -using geometry = mapnik::util::variant, - line_string, - polygon, - multi_point, - multi_line_string, - multi_polygon, - mapnik::util::recursive_wrapper > >; +using geometry_base = mapnik::util::variant, + line_string, + polygon, + multi_point, + multi_line_string, + multi_polygon, + mapnik::util::recursive_wrapper > >; +template +struct geometry : geometry_base +{ + using value_type = T; + + geometry() + : geometry_base() {} // empty + + template + geometry(G && geom) + : geometry_base(std::forward(geom)) {} + +}; template struct geometry_collection : std::vector> {};