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