Fix various issues related to stability when using highly compliant compilers such as Comeau 4.3.0.1, VC7.1 and GCC 3.2

git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@108 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
rani_sharoni 2003-02-27 20:09:08 +00:00
parent 80e63b12a3
commit b53b3265e4
56 changed files with 441 additions and 203 deletions

View file

@ -335,14 +335,10 @@ namespace Loki
class SingletonHolderStaticData
{
friend ClientType; // illegal (11.4/2) but works with VC
static ThreadingModelType s_ThreadingModelData;
static PtrInstanceType s_pInstance;
static bool s_destroyed;
};
template<class C, class M, class P>
M SingletonHolderStaticData<C, M, P>::s_ThreadingModelData;
template<class C, class M, class P>
P SingletonHolderStaticData<C, M, P>::s_pInstance;
@ -382,9 +378,7 @@ namespace Loki
// Helpers
static void MakeInstance()
{
typename ThreadingModel<T>::Lock guard(
MySingletonHolderStaticData::s_ThreadingModelData);
typename ThreadingModel<SingletonHolder>::Lock guard;
(void)guard;
if (!pInstance_())