Skip to content

Commit

Permalink
Getting geometry works with Visual Studio.
Browse files Browse the repository at this point in the history
  • Loading branch information
lygstate committed Mar 10, 2017
1 parent 12aae69 commit e8a8e38
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions geometry.hpp/include/mapbox/geometry/feature.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ using value_base = mapbox::util::variant<null_value_t, bool, uint64_t, int64_t,
struct value : value_base
{
using value_base::value_base;
template <typename U>
value(const U &_v) :value_base(_v) {}
template <typename U>
value(U&& _v) :value_base(_v) {}
};

using property_map = std::unordered_map<std::string, value>;
Expand Down
8 changes: 7 additions & 1 deletion geometry.hpp/include/mapbox/geometry/geometry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ template <typename T>
struct geometry : geometry_base<T>
{
using coordinate_type = T;
using geometry_base<T>::geometry_base;
using geometry_base_type = geometry_base<T>;
using geometry_base_type::geometry_base_type;

template <typename U>
geometry(const U &_v) :geometry_base_type(_v) {}
template <typename U>
geometry(U&& _v) :geometry_base_type(_v) {}

/*
* The default constructor would create a point geometry with default-constructed coordinates;
Expand Down

0 comments on commit e8a8e38

Please sign in to comment.