forked from boostorg/type_traits
First patches for MSVC-7.1
This commit is contained in:
@@ -128,13 +128,15 @@ public:
|
||||
|
||||
template<class T, class U> struct composite_pointer_type<T*, U*>
|
||||
{
|
||||
//Done in two steps to avoid compilation errors
|
||||
//in old compilers like MSVC 7.1
|
||||
typedef typename boost::conditional<
|
||||
|
||||
detail::has_common_pointee<T, U>::value,
|
||||
detail::common_pointee<T, U>,
|
||||
detail::composite_pointer_impl<T, U>
|
||||
|
||||
>::type::type * type;
|
||||
>::type first_type;
|
||||
typename first_type::type * type;
|
||||
};
|
||||
|
||||
} // namespace type_traits_detail
|
||||
|
@@ -37,7 +37,10 @@
|
||||
# pragma GCC system_header
|
||||
#elif defined(BOOST_MSVC)
|
||||
# pragma warning ( push )
|
||||
# pragma warning ( disable : 4018 4244 4547 4800 4804 4805 4913 6334)
|
||||
# pragma warning ( disable : 4018 4244 4547 4800 4804 4805 4913)
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
|
||||
# pragma warning ( disable : 6334)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
|
@@ -23,7 +23,10 @@
|
||||
# pragma GCC system_header
|
||||
#elif defined(BOOST_MSVC)
|
||||
# pragma warning ( push )
|
||||
# pragma warning ( disable : 4244 4913 6334)
|
||||
# pragma warning ( disable : 4244 4913)
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
|
||||
# pragma warning ( disable : 6334)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
|
@@ -31,9 +31,14 @@
|
||||
# pragma GCC system_header
|
||||
#elif defined(BOOST_MSVC)
|
||||
# pragma warning ( push )
|
||||
# pragma warning ( disable : 4146 4804 4913 4244 6334)
|
||||
# pragma warning ( disable : 4146 4804 4913 4244)
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
|
||||
# pragma warning ( disable : 6334)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
namespace boost {
|
||||
namespace detail {
|
||||
|
||||
|
@@ -300,13 +300,26 @@ struct is_convertible_basic_impl:
|
||||
// This version seems to work pretty well for a wide spectrum of compilers,
|
||||
// however it does rely on undefined behaviour by passing UDT's through (...).
|
||||
//
|
||||
|
||||
//Workaround for old compilers like MSVC 7.1 to avoid
|
||||
//forming a reference to an array of unknown bound
|
||||
template <typename From>
|
||||
struct is_convertible_basic_impl_add_lvalue_reference
|
||||
: add_lvalue_reference<From>
|
||||
{};
|
||||
|
||||
template <typename From>
|
||||
struct is_convertible_basic_impl_add_lvalue_reference<From[]>
|
||||
{
|
||||
typedef From type [];
|
||||
};
|
||||
|
||||
template <typename From, typename To>
|
||||
struct is_convertible_basic_impl
|
||||
{
|
||||
static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...);
|
||||
static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To);
|
||||
typedef typename add_lvalue_reference<From>::type lvalue_type;
|
||||
typedef typename add_rvalue_reference<From>::type rvalue_type;
|
||||
typedef typename is_convertible_basic_impl_add_lvalue_reference<From>::type lvalue_type;
|
||||
static lvalue_type _m_from;
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
@@ -316,6 +329,7 @@ struct is_convertible_basic_impl
|
||||
#endif
|
||||
#endif
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
typedef typename add_rvalue_reference<From>::type rvalue_type;
|
||||
BOOST_STATIC_CONSTANT(bool, value =
|
||||
sizeof( _m_check(static_cast<rvalue_type>(_m_from)) ) == sizeof(::boost::type_traits::yes_type)
|
||||
);
|
||||
|
@@ -19,7 +19,9 @@ namespace boost {
|
||||
|
||||
#if !defined( __CODEGEARC__ )
|
||||
|
||||
#if !(defined(__EDG_VERSION__) && __EDG_VERSION__ <= 238) && !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION)
|
||||
#if !(defined(BOOST_MSVC) && BOOST_MSVC <= 1310) && \
|
||||
!(defined(__EDG_VERSION__) && __EDG_VERSION__ <= 238) &&\
|
||||
!defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION)
|
||||
|
||||
namespace detail{
|
||||
|
||||
|
@@ -20,7 +20,9 @@ namespace boost {
|
||||
|
||||
#if !defined( __CODEGEARC__ )
|
||||
|
||||
#if !(defined(__EDG_VERSION__) && __EDG_VERSION__ <= 238) && !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION)
|
||||
#if !(defined(BOOST_MSVC) && BOOST_MSVC <= 1310) &&\
|
||||
!(defined(__EDG_VERSION__) && __EDG_VERSION__ <= 238) &&\
|
||||
!defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION)
|
||||
|
||||
namespace detail{
|
||||
|
||||
|
Reference in New Issue
Block a user