Merge branch 'develop'

This commit is contained in:
jzmaddock
2015-10-15 10:46:41 +01:00
11 changed files with 61 additions and 15 deletions

View File

@@ -84,6 +84,14 @@ template<class C1, class C2> struct common_member_class
>::type type;
};
//This indirection avoids compilation errors on some older
//compilers like MSVC 7.1
template<class CT, class CB>
struct common_member_class_pointer_to_member
{
typedef CT CB::* type;
};
template<class C1, class T1, class C2, class T2> struct composite_member_pointer_type<T1 C1::*, T2 C2::*>
{
private:
@@ -95,7 +103,7 @@ private:
public:
typedef CT CB::* type;
typedef typename common_member_class_pointer_to_member<CT, CB>::type type;
};
} // namespace type_traits_detail

View File

@@ -124,17 +124,26 @@ public:
typedef typename boost::copy_cv<typename boost::copy_cv<typename composite_pointer_type<T2, U2>::type const, T>::type, U>::type type;
};
//Old compilers like MSVC-7.1 have problems using boost::conditional in
//composite_pointer_type. Partially specializing on has_common_pointee<T, U>::value
//seems to make their life easier
template<class T, class U, bool = has_common_pointee<T, U>::value >
struct composite_pointer_type_dispatch
: common_pointee<T, U>
{};
template<class T, class U>
struct composite_pointer_type_dispatch<T, U, false>
: composite_pointer_impl<T, U>
{};
} // detail
template<class T, class U> struct composite_pointer_type<T*, U*>
{
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;
typedef typename detail::composite_pointer_type_dispatch<T, U>::type* type;
};
} // namespace type_traits_detail

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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)
);

0
include/boost/type_traits/is_floating_point.hpp Executable file → Normal file
View File

0
include/boost/type_traits/is_member_object_pointer.hpp Executable file → Normal file
View File

View File

@@ -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{

View File

@@ -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{

0
test/is_member_obj_test.cpp Executable file → Normal file
View File