summaryrefslogtreecommitdiff
path: root/TAO/tao/TAO_Singleton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/TAO_Singleton.cpp')
-rw-r--r--TAO/tao/TAO_Singleton.cpp23
1 files changed, 0 insertions, 23 deletions
diff --git a/TAO/tao/TAO_Singleton.cpp b/TAO/tao/TAO_Singleton.cpp
index 3ca35d08ca4..58d96602e2e 100644
--- a/TAO/tao/TAO_Singleton.cpp
+++ b/TAO/tao/TAO_Singleton.cpp
@@ -27,26 +27,16 @@ TAO_Singleton<TYPE, ACE_LOCK>::dump (void)
#if defined (ACE_HAS_DUMP)
ACE_TRACE ("TAO_Singleton<TYPE, ACE_LOCK>::dump");
-#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
TAOLIB_DEBUG ((LM_DEBUG, ACE_TEXT ("instance_ = %@"),
TAO_Singleton<TYPE, ACE_LOCK>::instance_i ()));
TAOLIB_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
#endif /* ACE_HAS_DUMP */
}
template <class TYPE, class ACE_LOCK> TAO_Singleton<TYPE, ACE_LOCK> *&
TAO_Singleton<TYPE, ACE_LOCK>::instance_i (void)
{
-#if defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
- // Pointer to the Singleton instance. This works around a bug with
- // G++ and it's (mis-)handling of templates and statics...
- static TAO_Singleton<TYPE, ACE_LOCK> *singleton_ = 0;
-
- return singleton_;
-#else
return TAO_Singleton<TYPE, ACE_LOCK>::singleton_;
-#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
}
template <class TYPE, class ACE_LOCK> TYPE *
@@ -120,15 +110,12 @@ TAO_Singleton<TYPE, ACE_LOCK>::cleanup (void *param)
#endif
}
-#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
// Pointer to the Singleton instance.
template <class TYPE, class ACE_LOCK> TAO_Singleton<TYPE, ACE_LOCK> *
TAO_Singleton<TYPE, ACE_LOCK>::singleton_ = 0;
template <class TYPE, class ACE_LOCK> TAO_TSS_Singleton<TYPE, ACE_LOCK> *
TAO_TSS_Singleton<TYPE, ACE_LOCK>::singleton_ = 0;
-#endif /* !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) */
-
template <class TYPE, class ACE_LOCK> void
TAO_TSS_Singleton<TYPE, ACE_LOCK>::dump (void)
@@ -136,26 +123,16 @@ TAO_TSS_Singleton<TYPE, ACE_LOCK>::dump (void)
#if defined (ACE_HAS_DUMP)
ACE_TRACE ("TAO_TSS_Singleton<TYPE, ACE_LOCK>::dump");
-#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
TAOLIB_DEBUG ((LM_DEBUG, ACE_TEXT ("instance_ = %@"),
TAO_TSS_Singleton<TYPE, ACE_LOCK>::instance_i ()));
TAOLIB_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
#endif /* ACE_HAS_DUMP */
}
template <class TYPE, class ACE_LOCK> TAO_TSS_Singleton<TYPE, ACE_LOCK> *&
TAO_TSS_Singleton<TYPE, ACE_LOCK>::instance_i (void)
{
-#if defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
- // Pointer to the Singleton instance. This works around a bug with
- // G++ and it's (mis-)handling of templates and statics...
- static TAO_TSS_Singleton<TYPE, ACE_LOCK> *singleton_ = 0;
-
- return singleton_;
-#else
return TAO_TSS_Singleton<TYPE, ACE_LOCK>::singleton_;
-#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
}
template <class TYPE, class ACE_LOCK> TYPE *