diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2012-09-07 10:31:27 +0200 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2012-09-07 10:31:27 +0200 |
commit | f6939dfbdd979dfbb749c64703d0cdc53dae106d (patch) | |
tree | e4e4560cca9d956d6af13fe44f3522b9cc811047 /include/util | |
parent | 1a59d81f570e8c88860b7e5e1b20ec57370a56c1 (diff) | |
download | crawler-f6939dfbdd979dfbb749c64703d0cdc53dae106d.tar.gz crawler-f6939dfbdd979dfbb749c64703d0cdc53dae106d.tar.bz2 |
fixed miracle of unresolved instance function in Singleton (we
need a "usage" of the template somewhere in the DLL)
fixed all module tests on Windows
Diffstat (limited to 'include/util')
-rwxr-xr-x | include/util/Singleton.hpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/util/Singleton.hpp b/include/util/Singleton.hpp index 80ab5e8..de43dbe 100755 --- a/include/util/Singleton.hpp +++ b/include/util/Singleton.hpp @@ -12,12 +12,15 @@ #define DECLARE_SINGLETON( T ) \ friend class Singleton< T >; \ friend class scopedPtr< T >; + +#define DEFINE_SINGLETON( T ) \ + template class Singleton< T >; template< class T > class Singleton : private noncopyable { public: - UTIL_DLL_VISIBLE static T& instance( ) + static UTIL_DLL_VISIBLE T& instance( ) { if( destroyed ) { onDeadReference( ); |