From 08c36ab6e5e14e1dc95aa4957332c63f0903e0c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 7 Jul 2013 10:41:25 +0200 Subject: [PATCH] GCC 4.5 compatibility: 4.5 and >4.5 have mutually exclusive requirements. --- src/AbstractImage.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/AbstractImage.h b/src/AbstractImage.h index abec6dacf..ba8567195 100644 --- a/src/AbstractImage.h +++ b/src/AbstractImage.h @@ -81,7 +81,13 @@ class MAGNUM_EXPORT AbstractImage { std::size_t pixelSize() const { return pixelSize(_format, _type); } protected: + /* GCC > 4.5 needs to have `= default` in class body, otherwise can't + use constexpr */ + #ifndef CORRADE_GCC45_COMPATIBILITY + ~AbstractImage() = default; + #else ~AbstractImage(); + #endif #ifdef DOXYGEN_GENERATING_OUTPUT private: @@ -92,8 +98,10 @@ class MAGNUM_EXPORT AbstractImage { ImageType _type; }; +#ifdef CORRADE_GCC45_COMPATIBILITY /* GCC 4.5 doesn't take `= default` as inline */ inline AbstractImage::~AbstractImage() = default; +#endif }