diff --git a/include/loki/Singleton.h b/include/loki/Singleton.h index 5b4ae5b..eaa634e 100644 --- a/include/loki/Singleton.h +++ b/include/loki/Singleton.h @@ -860,7 +860,7 @@ namespace Loki /// Put this macro called with a SingletonHolder typedef into your cpp file. #define LOKI_SINGLETON_INSTANCE_DEFINITION(SHOLDER) \ - \ + template<> \ SHOLDER::ObjectType& ::Loki::Singleton::Instance() \ { \ return SHOLDER::Instance(); \ @@ -883,6 +883,9 @@ namespace Loki #endif // SINGLETON_INC_ // $Log$ +// Revision 1.28 2006/03/03 11:58:24 syntheticpp +// also compile with gcc +// // Revision 1.27 2006/02/28 10:31:01 syntheticpp // replace tabs // diff --git a/test/SingletonDll/singletondll.cpp b/test/SingletonDll/singletondll.cpp index fb49abc..1098f14 100755 --- a/test/SingletonDll/singletondll.cpp +++ b/test/SingletonDll/singletondll.cpp @@ -12,14 +12,13 @@ // $Header: -#include +#include "singletondll.h" #include "foo.h" typedef Loki::SingletonHolder FooSingleton; - LOKI_SINGLETON_INSTANCE_DEFINITION(FooSingleton) /* // code generated by the macro: @@ -29,11 +28,11 @@ Foo& Loki::Singleton::Instance() }; */ - +template<> Foo& Singleton::Instance() { return FooSingleton::Instance(); -}; +}