fix mscv compiler errors

This commit is contained in:
Mathis Logemann 2020-11-20 20:02:40 +01:00
parent f6b7bc0867
commit fe3160ca99
4 changed files with 17 additions and 3 deletions

View file

@ -50,6 +50,17 @@
# endif
#endif
#if defined(__clang__)
#if __has_feature(cxx_inheriting_constructors)
#define MAPNIK_USE_INHERITING_CONSTRUCTORS 1
#endif
#elif (defined(__GNUC__) && \
(__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ >= 8)) || \
(__cpp_inheriting_constructors >= 200802) || \
(defined(_MSC_VER) && _MSC_VER >= 1910)
#define MAPNIK_USE_INHERITING_CONSTRUCTORS 1
#endif
#define PROJ_ENVELOPE_POINTS 20
#endif // MAPNIK_CONFIG_HPP

View file

@ -24,6 +24,7 @@
#define MAPNIK_GEOMETRY_HPP
// mapnik
#include <mapnik/config.hpp>
#include <mapnik/geometry/point.hpp>
#include <mapnik/geometry/line_string.hpp>
#include <mapnik/geometry/polygon.hpp>
@ -59,7 +60,7 @@ struct geometry : geometry_base<T>
{
using coordinate_type = T;
#if __cpp_inheriting_constructors >= 200802
#if MAPNIK_USE_INHERITING_CONSTRUCTORS
using geometry_base<T>::geometry_base;

View file

@ -23,6 +23,7 @@
#ifndef MAPNIK_JSON_GEOJSON_GRAMMAR_X3_HPP
#define MAPNIK_JSON_GEOJSON_GRAMMAR_X3_HPP
#include <mapnik/config.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/util/variant.hpp>
#include <mapnik/json/json_grammar_config.hpp>
@ -54,7 +55,7 @@ using geojson_value_base = mapnik::util::variant<value_null,
geojson_object>;
struct geojson_value : geojson_value_base
{
#if __cpp_inheriting_constructors >= 200802
#if MAPNIK_USE_INHERITING_CONSTRUCTORS
using geojson_value_base::geojson_value_base;

View file

@ -24,6 +24,7 @@
#define MAPNIK_JSON_JSON_VALUE_HPP
// mapnik
#include <mapnik/config.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/util/variant.hpp>
// stl
@ -46,7 +47,7 @@ using json_value_base = mapnik::util::variant<value_null,
json_object>;
struct json_value : json_value_base
{
#if __cpp_inheriting_constructors >= 200802
#if MAPNIK_USE_INHERITING_CONSTRUCTORS
using json_value_base::json_value_base;