Browse Source

Work around clang-cl needing full definitions for extern template.

I wanted to avoid including extra stuff with the Manager.hpp split, but
this would make it even worse than having Array and String included
unconditionally. Fortunately it's enough to simply not even have the
declaration.
pull/556/head
Vladimír Vondruš 4 years ago
parent
commit
035af64b95
  1. 4
      src/Magnum/Audio/AbstractImporter.h
  2. 4
      src/Magnum/ShaderTools/AbstractConverter.h
  3. 4
      src/Magnum/Text/AbstractFont.h
  4. 4
      src/Magnum/Text/AbstractFontConverter.h
  5. 4
      src/Magnum/Trade/AbstractImageConverter.h
  6. 4
      src/Magnum/Trade/AbstractImporter.h
  7. 5
      src/Magnum/Trade/AbstractSceneConverter.h

4
src/Magnum/Audio/AbstractImporter.h

@ -235,7 +235,9 @@ class MAGNUM_AUDIO_EXPORT AbstractImporter: public PluginManager::AbstractManagi
}}
#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG))
/* 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<Magnum::Audio::AbstractImporter>;
}}

4
src/Magnum/ShaderTools/AbstractConverter.h

@ -1148,7 +1148,9 @@ template<class Callback, class T> void AbstractConverter::setInputFileCallback(C
}}
#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG))
/* 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<Magnum::ShaderTools::AbstractConverter>;
}}

4
src/Magnum/Text/AbstractFont.h

@ -649,7 +649,9 @@ template<class Callback, class T> void AbstractFont::setFileCallback(Callback ca
}}
#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG))
/* 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<Magnum::Text::AbstractFont>;
}}

4
src/Magnum/Text/AbstractFontConverter.h

@ -410,7 +410,9 @@ class MAGNUM_TEXT_EXPORT AbstractFontConverter: public PluginManager::AbstractPl
}}
#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG))
/* 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<Magnum::Text::AbstractFontConverter>;
}}

4
src/Magnum/Trade/AbstractImageConverter.h

@ -1735,7 +1735,9 @@ class MAGNUM_TRADE_EXPORT AbstractImageConverter: public PluginManager::Abstract
}}
#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG))
/* 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<Magnum::Trade::AbstractImageConverter>;
}}

4
src/Magnum/Trade/AbstractImporter.h

@ -2540,7 +2540,9 @@ template<class Callback, class T> void AbstractImporter::setFileCallback(Callbac
}}
#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG))
/* 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<Magnum::Trade::AbstractImporter>;
}}

5
src/Magnum/Trade/AbstractSceneConverter.h

@ -449,8 +449,9 @@ class MAGNUM_TRADE_EXPORT AbstractSceneConverter: public PluginManager::Abstract
};
}}
#if defined(CORRADE_TARGET_WINDOWS) && !(defined(CORRADE_TARGET_MINGW) && !defined(CORRADE_TARGET_CLANG))
/* 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<Magnum::Trade::AbstractSceneConverter>;
}}

Loading…
Cancel
Save