From: SourceForge.net <no...@so...> - 2006-05-26 16:26:10
|
Bugs item #1495609, was opened at 2006-05-26 18:12 Message generated for change (Comment added) made by syntheticpp You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=396644&aid=1495609&group_id=29557 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Rejected Priority: 5 Submitted By: Joseph Winston (josephwinston) >Assigned to: Peter Kuemmel (syntheticpp) Summary: test/SingletonDll/singletondll.cpp error on g++ 4.1.1 Initial Comment: singletondll.cpp fails to compile on g++ 4.1.1 with the following error: $ make -k CXX=g++-4.1.1 g++-4.1.1 --shared -Wall -Wold-style-cast -Wundef -Wsign-compare -Wconversion -Wpointer-arith -pedantic -O2 -I../../include -DNDEBUG -o libsingletondll.so singletondll.cpp -L. -lfoo singletondll.cpp:22: error: specialization of 'static T& Loki::Singleton<T>::Instance() [with T = Foo]' in different namespace singletondll.cpp:22: error: from definition of 'static T& Loki::Singleton<T>::Instance() [with T = Foo]' A simple fix for this problem is to change: LOKI_SINGLETON_INSTANCE_DEFINITION(FooSingleton) to: namespace Loki // jbw: Needed for gcc 4.1.1 { LOKI_SINGLETON_INSTANCE_DEFINITION(FooSingleton) } ---------------------------------------------------------------------- >Comment By: Peter Kuemmel (syntheticpp) Date: 2006-05-26 18:26 Message: Logged In: YES user_id=1159765 Thanks for the report Joseph, this bug is already fixed in cvs: loki/Singleton.h: #define LOKI_SINGLETON_INSTANCE_DEFINITION(SHOLDER)\ namespace Loki\ {\ template<>\ SHOLDER::ObjectType& Singleton<SHOLDER::ObjectType>::Instance()\ {\ return SHOLDER::Instance();\ }\ } Peter ---------------------------------------------------------------------- Comment By: Joseph Winston (josephwinston) Date: 2006-05-26 18:15 Message: Logged In: YES user_id=398495 This is for loki-0.1.4 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=396644&aid=1495609&group_id=29557 |