Workaround for Windows builds with GCC 14 patches

This commit is contained in:
David Hummel 2024-05-21 20:24:35 -07:00
parent 2ef5003283
commit 0526c603d4

View file

@ -39,7 +39,11 @@
namespace mapnik { namespace mapnik {
template<typename T> template<typename T>
#ifdef _WIN32
class CreateUsingNew
#else
class MAPNIK_DECL CreateUsingNew class MAPNIK_DECL CreateUsingNew
#endif
{ {
public: public:
static T* create() { return new T; } static T* create() { return new T; }
@ -47,7 +51,11 @@ class MAPNIK_DECL CreateUsingNew
}; };
template<typename T> template<typename T>
#ifdef _WIN32
class CreateStatic
#else
class MAPNIK_DECL CreateStatic class MAPNIK_DECL CreateStatic
#endif
{ {
private: private:
using storage_type = typename std::aligned_storage<sizeof(T), alignof(T)>::type; using storage_type = typename std::aligned_storage<sizeof(T), alignof(T)>::type;