#pragma once #include #include #include #include #include #include #include // stl #include namespace mapbox { namespace geometry { template class Cont = std::vector> struct geometry_collection; template using geometry_base = mapbox::util::variant, line_string, polygon, multi_point, multi_line_string, multi_polygon, geometry_collection>; template struct geometry : geometry_base { using coordinate_type = T; using geometry_base::geometry_base; /* * The default constructor would create a point geometry with default-constructed coordinates; * i.e. (0, 0). Since this is not particularly useful, and could hide bugs, it is disabled. */ geometry() = delete; }; template class Cont> struct geometry_collection : Cont> { using coordinate_type = T; using geometry_type = geometry; using container_type = Cont; geometry_collection() = default; geometry_collection(geometry_collection const&) = default; geometry_collection(geometry_collection &&) = default; geometry_collection(std::initializer_list && args) : container_type(std::forward>(args)) {}; }; } // namespace geometry } // namespace mapbox