From 1265403baee1f582b1bbbc382f660e23efee5242 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 18 Feb 2019 00:02:17 +0000 Subject: Fixup build with clang --- slicer/slicer/modelPartsTypes.impl.h | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/slicer/slicer/modelPartsTypes.impl.h b/slicer/slicer/modelPartsTypes.impl.h index 2e744eb..74bf0c6 100644 --- a/slicer/slicer/modelPartsTypes.impl.h +++ b/slicer/slicer/modelPartsTypes.impl.h @@ -13,15 +13,15 @@ #include #define CUSTOMMODELPARTFOR(Type, BaseModelPart, ModelPartType) \ - template<> ModelPartPtr ModelPart::CreateFor() { return std::make_shared(nullptr); } \ - template<> ModelPartPtr ModelPart::CreateFor(Type & s) { return std::make_shared(&s); } \ - template<> ModelPartPtr ModelPart::CreateFor(const Type & s) { return CreateFor(const_cast(s)); } \ - template<> ModelPartPtr ModelPart::CreateFor(Ice::optional & s) { return std::make_shared>(&s); } \ - template<> ModelPartPtr ModelPart::CreateFor(const Ice::optional & s) { return CreateFor(const_cast &>(s)); } \ - template<> ModelPartForRootPtr ModelPart::CreateRootFor(Type & s) { return std::make_shared>(&s); } \ - template<> ModelPartForRootPtr ModelPart::CreateRootFor(Ice::optional & s) { return std::make_shared>>(&s); } \ - template<> ModelPartForRootPtr ModelPart::CreateRootFor(const Type & s) { return CreateRootFor(const_cast(s)); } \ - template<> ModelPartForRootPtr ModelPart::CreateRootFor(const Ice::optional & s) { return CreateRootFor(const_cast &>(s)); } \ + template<> DLL_PUBLIC ModelPartPtr ModelPart::CreateFor() { return std::make_shared(nullptr); } \ + template<> DLL_PUBLIC ModelPartPtr ModelPart::CreateFor(Type & s) { return std::make_shared(&s); } \ + template<> DLL_PUBLIC ModelPartPtr ModelPart::CreateFor(const Type & s) { return CreateFor(const_cast(s)); } \ + template<> DLL_PUBLIC ModelPartPtr ModelPart::CreateFor(Ice::optional & s) { return std::make_shared>(&s); } \ + template<> DLL_PUBLIC ModelPartPtr ModelPart::CreateFor(const Ice::optional & s) { return CreateFor(const_cast &>(s)); } \ + template<> DLL_PUBLIC ModelPartForRootPtr ModelPart::CreateRootFor(Type & s) { return std::make_shared>(&s); } \ + template<> DLL_PUBLIC ModelPartForRootPtr ModelPart::CreateRootFor(Ice::optional & s) { return std::make_shared>>(&s); } \ + template<> DLL_PUBLIC ModelPartForRootPtr ModelPart::CreateRootFor(const Type & s) { return CreateRootFor(const_cast(s)); } \ + template<> DLL_PUBLIC ModelPartForRootPtr ModelPart::CreateRootFor(const Ice::optional & s) { return CreateRootFor(const_cast &>(s)); } \ template class BaseModelPart; \ template class ModelPartForRoot; \ template class ModelPartForRoot< Ice::optional >; \ @@ -30,11 +30,15 @@ CUSTOMMODELPARTFOR(Type, ModelPartType, ModelPartType) #define MODELPARTFORSTREAM(StreamImpl) \ namespace Slicer { \ - template<> ModelPartForRootPtr ModelPart::CreateRootFor(const StreamImpl & stream) { \ + template<> DLL_PUBLIC ModelPartForRootPtr ModelPart::CreateRootFor(const StreamImpl & stream) { \ return std::make_shared>(const_cast(&stream)); \ } \ } +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wundefined-var-template" +#endif namespace Slicer { // ModelPartForRoot template @@ -739,6 +743,9 @@ namespace Slicer { return ModelPartForRoot>::rootName; } } +#ifdef __clang__ +#pragma clang diagnostic pop +#endif #endif -- cgit v1.2.3