From ac013346a48aba3ed9e8829d49f73a2414f66fd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 20 Jun 2026 17:19:07 +0200 Subject: [PATCH] MSVC 2017, you too. I wanted to just ignore these, but the RT builds for some reason have warnings-as-error enabled by default and, UGH, I just want this thing to finally pass the CI. --- src/Magnum/Magnum.h | 7 ++++++- src/Magnum/Resource.h | 12 +++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/Magnum/Magnum.h b/src/Magnum/Magnum.h index aea0e482f..9406e6339 100644 --- a/src/Magnum/Magnum.h +++ b/src/Magnum/Magnum.h @@ -1363,7 +1363,12 @@ class CompressedPixelStorage; enum class CORRADE_DEPRECATED_ENUM("the ResourceManager class is obsolete") ResourceState: UnsignedByte; enum class CORRADE_DEPRECATED_ENUM("the ResourceManager class is obsolete") ResourceDataState: UnsignedByte; enum class CORRADE_DEPRECATED_ENUM("the ResourceManager class is obsolete") ResourcePolicy: UnsignedByte; -template class CORRADE_DEPRECATED("the ResourceManager class is obsolete") Resource; +template class + #ifndef CORRADE_MSVC2017_COMPATIBILITY + /* See Resource.h for details why this is removed on MSVC 2017 */ + CORRADE_DEPRECATED("the ResourceManager class is obsolete") + #endif + Resource; class CORRADE_DEPRECATED("the ResourceManager class is obsolete") ResourceKey; template class CORRADE_DEPRECATED("the ResourceManager class is obsolete") ResourceManager; #endif diff --git a/src/Magnum/Resource.h b/src/Magnum/Resource.h index c9008794e..56b24a0f0 100644 --- a/src/Magnum/Resource.h +++ b/src/Magnum/Resource.h @@ -161,7 +161,17 @@ template #else template #endif -class CORRADE_DEPRECATED("the ResourceManager class is obsolete") Resource { +class + #ifndef CORRADE_MSVC2017_COMPATIBILITY + /* MSVC 2017 warns in DebugTools/ForceRenderer.cpp and ObjectRenderer.cpp + about use of ~Resource() from the (defaulted!) class destructor. The + warning cannot be suppressed and is reported at the very last line of + the files, and all warnings are treated as errors in the RT build, so + just skip the deprecation macro there. Ugh. */ + CORRADE_DEPRECATED("the ResourceManager class is obsolete") + #endif + Resource +{ public: /** * @brief Default constructor