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:
parent
80e63b12a3
commit
b53b3265e4
56 changed files with 441 additions and 203 deletions
|
@ -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_())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue