From 2ef5003283ef6cc56a170fb1e3bbb180c6b90b3e Mon Sep 17 00:00:00 2001 From: David Hummel <6109326+hummeltech@users.noreply.github.com> Date: Tue, 21 May 2024 07:46:18 -0700 Subject: [PATCH 1/2] Fix building with GCC 14 Co-authored-by: Tom Hughes --- include/mapnik/geometry/fusion_adapted.hpp | 2 ++ include/mapnik/util/singleton.hpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/mapnik/geometry/fusion_adapted.hpp b/include/mapnik/geometry/fusion_adapted.hpp index fcf574567..69cbde29f 100644 --- a/include/mapnik/geometry/fusion_adapted.hpp +++ b/include/mapnik/geometry/fusion_adapted.hpp @@ -26,6 +26,8 @@ #include #include +#include + BOOST_FUSION_ADAPT_STRUCT(mapnik::geometry::point, (double, x)(double, y)) BOOST_FUSION_ADAPT_STRUCT(mapnik::geometry::point, (std::int64_t, x)(std::int64_t, y)) diff --git a/include/mapnik/util/singleton.hpp b/include/mapnik/util/singleton.hpp index bfc86913f..3397ae99a 100644 --- a/include/mapnik/util/singleton.hpp +++ b/include/mapnik/util/singleton.hpp @@ -39,7 +39,7 @@ namespace mapnik { template -class CreateUsingNew +class MAPNIK_DECL CreateUsingNew { public: static T* create() { return new T; } @@ -47,7 +47,7 @@ class CreateUsingNew }; template -class CreateStatic +class MAPNIK_DECL CreateStatic { private: using storage_type = typename std::aligned_storage::type; From 0526c603d4a1b79ebc321182c892f09f86a57000 Mon Sep 17 00:00:00 2001 From: David Hummel <6109326+hummeltech@users.noreply.github.com> Date: Tue, 21 May 2024 20:24:35 -0700 Subject: [PATCH 2/2] Workaround for Windows builds with GCC 14 patches --- include/mapnik/util/singleton.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/mapnik/util/singleton.hpp b/include/mapnik/util/singleton.hpp index 3397ae99a..ba99b2327 100644 --- a/include/mapnik/util/singleton.hpp +++ b/include/mapnik/util/singleton.hpp @@ -39,7 +39,11 @@ namespace mapnik { template +#ifdef _WIN32 +class CreateUsingNew +#else class MAPNIK_DECL CreateUsingNew +#endif { public: static T* create() { return new T; } @@ -47,7 +51,11 @@ class MAPNIK_DECL CreateUsingNew }; template +#ifdef _WIN32 +class CreateStatic +#else class MAPNIK_DECL CreateStatic +#endif { private: using storage_type = typename std::aligned_storage::type;