From 7d5e36cee8d8ef5bb1f2bab3b06ae3e3b74bb795 Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Fri, 10 Mar 2017 14:35:50 +0800 Subject: [PATCH] Getting geometry works with Visual Studio. --- geometry.hpp/include/mapbox/geometry/feature.hpp | 6 +++++- geometry.hpp/include/mapbox/geometry/geometry.hpp | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/geometry.hpp/include/mapbox/geometry/feature.hpp b/geometry.hpp/include/mapbox/geometry/feature.hpp index 7008198..bb67c29 100644 --- a/geometry.hpp/include/mapbox/geometry/feature.hpp +++ b/geometry.hpp/include/mapbox/geometry/feature.hpp @@ -37,7 +37,11 @@ using value_base = mapbox::util::variant + value(const U &_v) :value_base(_v) {} + template + value(U&& _v) :value_base(_v) {} }; using property_map = std::unordered_map; diff --git a/geometry.hpp/include/mapbox/geometry/geometry.hpp b/geometry.hpp/include/mapbox/geometry/geometry.hpp index a9d072b..e5f7e70 100644 --- a/geometry.hpp/include/mapbox/geometry/geometry.hpp +++ b/geometry.hpp/include/mapbox/geometry/geometry.hpp @@ -31,7 +31,12 @@ template struct geometry : geometry_base { using coordinate_type = T; - using geometry_base::geometry_base; + using geometry_base_type = geometry_base; + + template + geometry(const U &_v) :geometry_base_type(_v) {} + template + geometry(U&& _v) :geometry_base_type(_v) {} /* * The default constructor would create a point geometry with default-constructed coordinates;