[complement-svn] SF.net SVN: complement: [1701] trunk/complement/explore/include
Status: Pre-Alpha
Brought to you by:
complement
From: <com...@us...> - 2007-08-23 08:49:30
|
Revision: 1701 http://complement.svn.sourceforge.net/complement/?rev=1701&view=rev Author: complement Date: 2007-08-23 01:49:29 -0700 (Thu, 23 Aug 2007) Log Message: ----------- add __FIT_NO_INLINE_TEMPLATE_STATIC_INITIALISATION for gcc < 3.4 Modified Paths: -------------- trunk/complement/explore/include/config/_gcc.h trunk/complement/explore/include/misc/type_traits.h Modified: trunk/complement/explore/include/config/_gcc.h =================================================================== --- trunk/complement/explore/include/config/_gcc.h 2007-08-23 08:47:58 UTC (rev 1700) +++ trunk/complement/explore/include/config/_gcc.h 2007-08-23 08:49:29 UTC (rev 1701) @@ -1,35 +1,30 @@ -/* Time-stamp: <05/12/12 10:47:53 ptr> */ +/* Time-stamp: <07/08/21 10:39:52 ptr> */ /* - * - * Copyright (c) 2003 + * Copyright (c) 2003, 2007 * Petr Ovtchenkov * - * Licensed under the Academic Free License Version 2.1 + * Licensed under the Academic Free License Version 3.0 * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use, copy, modify, distribute and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation. - * */ #ifndef __config__gcc_h #define __config__gcc_h /* -#if defined(__GNUC__) && (__GNUC__==3) // gcc 3.1.1 at least +#if (__GNUC__==3) // gcc 3.1.1 at least # define __FIT_TYPENAME_TEMPLATE_PARAMETER_RET #endif */ -#if defined(__GNUC__) && ( __GNUC__ == 2 ) && (__GNUC_MINOR__ == 95) +#if ( __GNUC__ == 2 ) && (__GNUC_MINOR__ == 95) /* at least 2.95.3 #define __FIT_STD_AS_GLOBAL */ #endif +/* 3.3.6, but 3.4.6 and 4.1.1 free from this */ +#if (__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ < 4)) +# define __FIT_NO_INLINE_TEMPLATE_STATIC_INITIALISATION +#endif + #endif /* __config__gcc_h */ Modified: trunk/complement/explore/include/misc/type_traits.h =================================================================== --- trunk/complement/explore/include/misc/type_traits.h 2007-08-23 08:47:58 UTC (rev 1700) +++ trunk/complement/explore/include/misc/type_traits.h 2007-08-23 08:49:29 UTC (rev 1701) @@ -1,4 +1,4 @@ -// -*- C++ -*- Time-stamp: <07/08/06 10:30:28 ptr> +// -*- C++ -*- Time-stamp: <07/08/21 10:42:14 ptr> /* * Copyright (c) 2007 @@ -49,7 +49,7 @@ static __t2 __test(...); public: -#if defined(__GNUC__) && (__GNUC__ < 4) +#ifdef __FIT_NO_INLINE_TEMPLATE_STATIC_INITIALISATION static const bool __value; #else static const bool __value = sizeof(__test<_Tp>(0)) == 1; @@ -57,7 +57,7 @@ }; -#if defined(__GNUC__) && (__GNUC__ < 4) +#ifdef __FIT_NO_INLINE_TEMPLATE_STATIC_INITIALISATION template <class _Tp> const bool __instance<_Tp>::__value = sizeof(__instance<_Tp>::__test<_Tp>(0)) == 1; #endif @@ -74,14 +74,14 @@ static __t2 __test(...); public: -#if defined(__GNUC__) && (__GNUC__ < 4) +#ifdef __FIT_NO_INLINE_TEMPLATE_STATIC_INITIALISATION static const bool __value; #else static const bool __value = sizeof(__test<T>(0)) == 1; #endif }; -#if defined(__GNUC__) && (__GNUC__ < 4) +#ifdef __FIT_NO_INLINE_TEMPLATE_STATIC_INITIALISATION template <class T> const bool __uoc_aux<T>::__value = sizeof(__uoc_aux<T>::__test<T>(0)) == 1; #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |