A little cleanup. Moved class to SmartPtr.cpp and SmartPtr.h files.

git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@1110 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
rich_sposato 2011-09-20 22:34:24 +00:00
parent 80a07d19e8
commit 16094ffe39
16 changed files with 450 additions and 344 deletions

View file

@ -28,21 +28,29 @@
// The __APPLE__ macro does not refer to a compiler, but to the Apple OSX operating system.
#if defined( __APPLE__ )
#warning "GCC for Apple does not allow thread_local storage, so you can not use some parts of Loki."
#undef COMPILER_ALLOWS_THREAD_LOCAL_STORAGE
#undef LOKI_THINKS_COMPILER_ALLOWS_THREAD_LOCAL_STORAGE
#elif defined( __CYGWIN__ )
#if ( __GNUC__ <= 3 )
#warning "Older versions of GCC for Cygwin do not allow thread_local storage, so you can not use some parts of Loki."
#undef COMPILER_ALLOWS_THREAD_LOCAL_STORAGE
#undef LOKI_THINKS_COMPILER_ALLOWS_THREAD_LOCAL_STORAGE
#endif
#elif ( __GNUC__ == 4 ) // GNU versions other than Cygwin.
#if ( __GNUC_MINOR__ == 4 )
#warning "GCC version 4.4 implements thread_local storage incorrectly, so you can not use some parts of Loki."
#undef COMPILER_ALLOWS_THREAD_LOCAL_STORAGE
#if ( __GNUC_MINOR__ < 4 )
#warning "GCC versions before 4.4 implements thread_local storage incorrectly, so you can not use some parts of Loki."
#undef LOKI_THINKS_COMPILER_ALLOWS_THREAD_LOCAL_STORAGE
#else
#warning "Versions 4.4 through 4.6 of GCC implemented thread_local storage for some platforms, but not others. Run ThreadLocal test project."
#endif
#endif
#endif
#elif defined( _MSC_VER )
#if ( _MSC_VER < 1300 )
#warning "Only Visual Studio versions 7.0 and after support thread local storage properly, so you can not use some parts of Loki."
#undef LOKI_THINKS_COMPILER_ALLOWS_THREAD_LOCAL_STORAGE
#endif
#endif
#if defined( LOKI_THINKS_COMPILER_ALLOWS_THREAD_LOCAL_STORAGE ) && !defined( LOKI_THREAD_LOCAL )
@ -57,11 +65,7 @@
you can't use some parts of Loki.
*/
#if defined( _MSC_VER )
#if ( _MSC_VER >= 1300 )
#define LOKI_THREAD_LOCAL __declspec( thread )
#else
#error "Only Visual Studio versions 7.0 and after supported."
#endif
#define LOKI_THREAD_LOCAL __declspec( thread )
#elif ( __GNUC__ )
#define LOKI_THREAD_LOCAL __thread