From ca722eac6e69896d28b8015bc62384aae2f2e51a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 6 Jun 2022 19:08:21 +0200 Subject: [PATCH] Don't declare extern PluginManager::Manager template anywhere. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Originally I copied this over from SceneGraph template classes, where it was used to prevent the compiler from needlessly instantiating a template that was already available elsewhere. But this is a different case, the extern template is not preventing any instatiation of anything, no code is inline, so it apparently should not have been there at all, instead of being disabled for ḾinGW GCC and clang-cl, and then subsequently discovering it also breaks MinGW Clang. Since I'm not testing with MinGW Clang on the CI (only with MinGW GCC), this went unnoticed for a while -- sorry. --- src/Magnum/Audio/AbstractImporter.h | 8 -------- src/Magnum/ShaderTools/AbstractConverter.h | 8 -------- src/Magnum/Text/AbstractFont.h | 8 -------- src/Magnum/Text/AbstractFontConverter.h | 8 -------- src/Magnum/Trade/AbstractImageConverter.h | 8 -------- src/Magnum/Trade/AbstractImporter.h | 8 -------- src/Magnum/Trade/AbstractSceneConverter.h | 8 -------- 7 files changed, 56 deletions(-) diff --git a/src/Magnum/Audio/AbstractImporter.h b/src/Magnum/Audio/AbstractImporter.h index 150640904..919e7f1d3 100644 --- a/src/Magnum/Audio/AbstractImporter.h +++ b/src/Magnum/Audio/AbstractImporter.h @@ -238,12 +238,4 @@ class MAGNUM_AUDIO_EXPORT AbstractImporter: public PluginManager::AbstractManagi }} -/* clang-cl complains about "explicit instantiation of undefined template" - here, so don't define anything */ -#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG)) && !defined(CORRADE_TARGET_CLANG_CL) -namespace Corrade { namespace PluginManager { - extern template class MAGNUM_AUDIO_EXPORT Manager; -}} -#endif - #endif diff --git a/src/Magnum/ShaderTools/AbstractConverter.h b/src/Magnum/ShaderTools/AbstractConverter.h index 6202e16bb..d1335591e 100644 --- a/src/Magnum/ShaderTools/AbstractConverter.h +++ b/src/Magnum/ShaderTools/AbstractConverter.h @@ -1203,12 +1203,4 @@ template void AbstractConverter::setInputFileCallback(C }} -/* clang-cl complains about "explicit instantiation of undefined template" - here, so don't define anything */ -#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG)) && !defined(CORRADE_TARGET_CLANG_CL) -namespace Corrade { namespace PluginManager { - extern template class MAGNUM_SHADERTOOLS_EXPORT Manager; -}} -#endif - #endif diff --git a/src/Magnum/Text/AbstractFont.h b/src/Magnum/Text/AbstractFont.h index 376d1b0b1..5d7b34f18 100644 --- a/src/Magnum/Text/AbstractFont.h +++ b/src/Magnum/Text/AbstractFont.h @@ -651,12 +651,4 @@ template void AbstractFont::setFileCallback(Callback ca }} -/* clang-cl complains about "explicit instantiation of undefined template" - here, so don't define anything */ -#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG)) && !defined(CORRADE_TARGET_CLANG_CL) -namespace Corrade { namespace PluginManager { - extern template class MAGNUM_TEXT_EXPORT Manager; -}} -#endif - #endif diff --git a/src/Magnum/Text/AbstractFontConverter.h b/src/Magnum/Text/AbstractFontConverter.h index 6008946cb..50d5f8190 100644 --- a/src/Magnum/Text/AbstractFontConverter.h +++ b/src/Magnum/Text/AbstractFontConverter.h @@ -420,12 +420,4 @@ class MAGNUM_TEXT_EXPORT AbstractFontConverter: public PluginManager::AbstractPl }} -/* clang-cl complains about "explicit instantiation of undefined template" - here, so don't define anything */ -#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG)) && !defined(CORRADE_TARGET_CLANG_CL) -namespace Corrade { namespace PluginManager { - extern template class MAGNUM_TEXT_EXPORT Manager; -}} -#endif - #endif diff --git a/src/Magnum/Trade/AbstractImageConverter.h b/src/Magnum/Trade/AbstractImageConverter.h index fce1d5e72..aef6e72c1 100644 --- a/src/Magnum/Trade/AbstractImageConverter.h +++ b/src/Magnum/Trade/AbstractImageConverter.h @@ -1906,12 +1906,4 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract }} -/* clang-cl complains about "explicit instantiation of undefined template" - here, so don't define anything */ -#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG)) && !defined(CORRADE_TARGET_CLANG_CL) -namespace Corrade { namespace PluginManager { - extern template class MAGNUM_TRADE_EXPORT Manager; -}} -#endif - #endif diff --git a/src/Magnum/Trade/AbstractImporter.h b/src/Magnum/Trade/AbstractImporter.h index 19622ceff..86055909a 100644 --- a/src/Magnum/Trade/AbstractImporter.h +++ b/src/Magnum/Trade/AbstractImporter.h @@ -2566,12 +2566,4 @@ template void AbstractImporter::setFileCallback(Callbac }} -/* clang-cl complains about "explicit instantiation of undefined template" - here, so don't define anything */ -#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG)) && !defined(CORRADE_TARGET_CLANG_CL) -namespace Corrade { namespace PluginManager { - extern template class MAGNUM_TRADE_EXPORT Manager; -}} -#endif - #endif diff --git a/src/Magnum/Trade/AbstractSceneConverter.h b/src/Magnum/Trade/AbstractSceneConverter.h index abdec939b..f5cac1b5b 100644 --- a/src/Magnum/Trade/AbstractSceneConverter.h +++ b/src/Magnum/Trade/AbstractSceneConverter.h @@ -482,12 +482,4 @@ class MAGNUM_TRADE_EXPORT AbstractSceneConverter: public PluginManager::Abstract }} -/* clang-cl complains about "explicit instantiation of undefined template" - here, so don't define anything */ -#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG)) && !defined(CORRADE_TARGET_CLANG_CL) -namespace Corrade { namespace PluginManager { - extern template class MAGNUM_TRADE_EXPORT Manager; -}} -#endif - #endif