use proper feature-test macro for inheriting constructors

This commit is contained in:
Mickey Rose 2016-08-03 00:25:48 +02:00
parent 68db7ee224
commit f9d5c3a2f8
2 changed files with 15 additions and 6 deletions

View file

@ -146,13 +146,19 @@ struct geometry : geometry_base<T>
{
using coord_type = T;
geometry()
: geometry_base<T>() {} // empty
#if __cpp_inheriting_constructors >= 200802
using geometry_base<T>::geometry_base;
#else
geometry() = default;
template <typename G>
geometry(G && geom)
: geometry_base<T>(std::forward<G>(geom)) {}
#endif
};
template <typename T>

View file

@ -57,15 +57,18 @@ using json_value_base = mapnik::util::variant<value_null,
mapnik::util::recursive_wrapper<json_object> >;
struct json_value : json_value_base
{
#if __cpp_inheriting_constructors >= 200802
using json_value_base::json_value_base;
#else
#ifdef _WINDOWS
json_value() = default;
template <typename T>
json_value(T && val)
: json_value_base(std::forward<T>(val)) {}
#else
// MSVC 2015 inheriting constructors is not working in this context (support is apparently planned)
using json_value_base::json_value_base;
#endif
};