forked from boostorg/type_traits
TypeTraits: Remove obsolete GCC version checks.
[SVN r86077]
This commit is contained in:
@@ -120,7 +120,7 @@ namespace type_traits_detail {
|
||||
typedef BOOST_TYPEOF_TPL(declval_b() ? declval_T() : declval_U()) type;
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && __GNUC__ == 3 && (__GNUC_MINOR__ == 2 || __GNUC_MINOR__ == 3)
|
||||
#if defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ == 3
|
||||
public:
|
||||
void public_dummy_function_just_to_silence_warning();
|
||||
#endif
|
||||
|
@@ -27,7 +27,6 @@
|
||||
#endif
|
||||
|
||||
# if (BOOST_WORKAROUND(__MWERKS__, < 0x3000) \
|
||||
|| !defined(__EDG_VERSION__) && BOOST_WORKAROUND(__GNUC__, < 3) \
|
||||
|| BOOST_WORKAROUND(__IBMCPP__, < 600 ) \
|
||||
|| BOOST_WORKAROUND(__BORLANDC__, < 0x5A0) \
|
||||
|| defined(__ghs) \
|
||||
|
@@ -19,15 +19,8 @@
|
||||
// implementation helper:
|
||||
|
||||
|
||||
#if !(BOOST_WORKAROUND(__GNUC__,== 3) && BOOST_WORKAROUND(__GNUC_MINOR__, <= 2))
|
||||
namespace boost {
|
||||
namespace detail {
|
||||
#else
|
||||
#include <boost/type_traits/detail/yes_no_type.hpp>
|
||||
namespace boost {
|
||||
namespace type_traits {
|
||||
namespace gcc8503 {
|
||||
#endif
|
||||
|
||||
template <typename T> struct cv_traits_imp {};
|
||||
|
||||
@@ -63,32 +56,6 @@ struct cv_traits_imp<const volatile T*>
|
||||
typedef T unqualified_type;
|
||||
};
|
||||
|
||||
#if BOOST_WORKAROUND(__GNUC__,== 3) && BOOST_WORKAROUND(__GNUC_MINOR__, <= 2)
|
||||
// We have to exclude function pointers
|
||||
// (see http://gcc.gnu.org/bugzilla/show_bug.cgi?8503)
|
||||
yes_type mini_funcptr_tester(...);
|
||||
no_type mini_funcptr_tester(const volatile void*);
|
||||
|
||||
} // namespace gcc8503
|
||||
} // namespace type_traits
|
||||
|
||||
namespace detail {
|
||||
|
||||
// Use the implementation above for non function pointers
|
||||
template <typename T, unsigned Select
|
||||
= (unsigned)sizeof(::boost::type_traits::gcc8503::mini_funcptr_tester((T)0)) >
|
||||
struct cv_traits_imp : public ::boost::type_traits::gcc8503::cv_traits_imp<T> { };
|
||||
|
||||
// Functions are never cv-qualified
|
||||
template <typename T> struct cv_traits_imp<T*,1>
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(bool, is_const = false);
|
||||
BOOST_STATIC_CONSTANT(bool, is_volatile = false);
|
||||
typedef T unqualified_type;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace detail
|
||||
} // namespace boost
|
||||
|
||||
|
@@ -36,7 +36,7 @@
|
||||
// warning C4804: '<' : unsafe use of type 'bool' in operation
|
||||
// warning C4805: '==' : unsafe mix of type 'bool' and type 'char' in operation
|
||||
// cannot find another implementation -> declared as system header to suppress these warnings.
|
||||
#if defined(__GNUC__) && ((__GNUC__==3 && __GNUC_MINOR__>=1) || (__GNUC__>3))
|
||||
#if defined(__GNUC__)
|
||||
# pragma GCC system_header
|
||||
#elif defined(BOOST_MSVC)
|
||||
# pragma warning ( push )
|
||||
|
@@ -22,7 +22,7 @@
|
||||
#include <boost/type_traits/detail/bool_trait_def.hpp>
|
||||
|
||||
// avoid warnings
|
||||
#if defined(__GNUC__) && ((__GNUC__==3 && __GNUC_MINOR__>=1) || (__GNUC__>3))
|
||||
#if defined(__GNUC__)
|
||||
# pragma GCC system_header
|
||||
#elif defined(BOOST_MSVC)
|
||||
# pragma warning ( push )
|
||||
|
@@ -30,7 +30,7 @@
|
||||
// warning C4146: unary minus operator applied to unsigned type, result still unsigned
|
||||
// warning C4804: '-' : unsafe use of type 'bool' in operation
|
||||
// cannot find another implementation -> declared as system header to suppress these warnings.
|
||||
#if defined(__GNUC__) && ((__GNUC__==3 && __GNUC_MINOR__>=1) || (__GNUC__>3))
|
||||
#if defined(__GNUC__)
|
||||
# pragma GCC system_header
|
||||
#elif defined(BOOST_MSVC)
|
||||
# pragma warning ( push )
|
||||
|
@@ -87,13 +87,6 @@ BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T& volatile,false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T& const volatile,false)
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__ < 3)
|
||||
// special case for gcc where illegally cv-qualified reference types can be
|
||||
// generated in some corner cases:
|
||||
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T const,!(::boost::is_reference<T>::value))
|
||||
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T volatile const,!(::boost::is_reference<T>::value))
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
namespace detail {
|
||||
|
@@ -50,20 +50,6 @@ BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T& volati
|
||||
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T& const volatile,true)
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__ < 3)
|
||||
// these allow us to work around illegally cv-qualified reference
|
||||
// types.
|
||||
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T const ,::boost::is_lvalue_reference<T>::value)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T volatile ,::boost::is_lvalue_reference<T>::value)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T const volatile ,::boost::is_lvalue_reference<T>::value)
|
||||
// However, the above specializations confuse gcc 2.96 unless we also
|
||||
// supply these specializations for array types
|
||||
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,unsigned long N,is_lvalue_reference,T[N],false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,unsigned long N,is_lvalue_reference,const T[N],false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,unsigned long N,is_lvalue_reference,volatile T[N],false)
|
||||
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,unsigned long N,is_lvalue_reference,const volatile T[N],false)
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
|
Reference in New Issue
Block a user