Merge branch 'develop'

This commit is contained in:
jzmaddock
2014-10-26 13:42:16 +01:00
4 changed files with 45 additions and 16 deletions

View File

@ -16,7 +16,6 @@
#include <boost/type_traits/has_nothrow_assign.hpp>
#include <boost/type_traits/is_array.hpp>
#include <boost/type_traits/is_reference.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/detail/ice_and.hpp>
#include <boost/type_traits/detail/ice_or.hpp>
#include <boost/type_traits/detail/ice_not.hpp>
@ -30,7 +29,7 @@ namespace boost {
namespace detail{
#ifndef BOOST_NO_CXX11_NOEXCEPT
#if !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR)
template <class T, class Enable = void>
struct false_or_cpp11_noexcept_move_assignable: public ::boost::false_type {};
@ -38,20 +37,28 @@ struct false_or_cpp11_noexcept_move_assignable: public ::boost::false_type {};
template <class T>
struct false_or_cpp11_noexcept_move_assignable <
T,
typename ::boost::enable_if_c<sizeof(T) && !::boost::is_const<T>::value && BOOST_NOEXCEPT_EXPR(::boost::declval<T&>() = ::boost::declval<T>())>::type
typename ::boost::enable_if_c<sizeof(T) && BOOST_NOEXCEPT_EXPR(::boost::declval<T&>() = ::boost::declval<T>())>::type
> : public ::boost::integral_constant<bool, BOOST_NOEXCEPT_EXPR(::boost::declval<T&>() = ::boost::declval<T>())>
{};
template <class T>
struct is_nothrow_move_assignable_imp{
BOOST_STATIC_CONSTANT(bool, value = (
::boost::type_traits::ice_and<
::boost::type_traits::ice_not< ::boost::is_volatile<T>::value >::value,
::boost::type_traits::ice_not< ::boost::is_reference<T>::value >::value,
::boost::detail::false_or_cpp11_noexcept_move_assignable<T>::value
>::value));
BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::false_or_cpp11_noexcept_move_assignable<T>::value);
};
template <class T>
struct is_nothrow_move_assignable_imp<T const> : public ::boost::false_type {};
template <class T>
struct is_nothrow_move_assignable_imp<T volatile> : public ::boost::false_type{};
template <class T>
struct is_nothrow_move_assignable_imp<T const volatile> : public ::boost::false_type{};
template <class T>
struct is_nothrow_move_assignable_imp<T&> : public ::boost::false_type{};
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template <class T>
struct is_nothrow_move_assignable_imp<T&&> : public ::boost::false_type{};
#endif
#else
template <class T>

View File

@ -28,7 +28,7 @@ namespace boost {
namespace detail{
#ifndef BOOST_NO_CXX11_NOEXCEPT
#if !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR)
template <class T, class Enable = void>
struct false_or_cpp11_noexcept_move_constructible: public ::boost::false_type {};
@ -42,14 +42,20 @@ struct false_or_cpp11_noexcept_move_constructible <
template <class T>
struct is_nothrow_move_constructible_imp{
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_and<
::boost::type_traits::ice_not< ::boost::is_volatile<T>::value >::value,
::boost::type_traits::ice_not< ::boost::is_reference<T>::value >::value,
::boost::detail::false_or_cpp11_noexcept_move_constructible<T>::value
>::value));
BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::false_or_cpp11_noexcept_move_constructible<T>::value);
};
template <class T>
struct is_nothrow_move_constructible_imp<volatile T> : public ::boost::false_type {};
template <class T>
struct is_nothrow_move_constructible_imp<const volatile T> : public ::boost::false_type{};
template <class T>
struct is_nothrow_move_constructible_imp<T&> : public ::boost::false_type{};
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template <class T>
struct is_nothrow_move_constructible_imp<T&&> : public ::boost::false_type{};
#endif
#else
template <class T>

View File

@ -195,12 +195,20 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<int[2][4][5][6][3
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<UDT>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<empty_UDT>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<void>::value, false);
#if !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR)
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<empty_POD_UDT>::value, true);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<POD_UDT>::value, true);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<POD_union_UDT>::value, true);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<empty_POD_union_UDT>::value, true);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<nothrow_assign_UDT>::value, true);
#else
// cases we would like to succeed but can't implement in the language:
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<empty_POD_UDT>::value, true, false);
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<POD_UDT>::value, true, false);
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<POD_union_UDT>::value, true, false);
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<empty_POD_union_UDT>::value, true, false);
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<nothrow_assign_UDT>::value, true, false);
#endif
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<nothrow_copy_UDT>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<nothrow_construct_UDT>::value, false);

View File

@ -191,12 +191,20 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<int[3][2]>::va
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<int[2][4][5][6][3]>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<UDT>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<void>::value, false);
#if !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR)
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<empty_POD_UDT>::value, true);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<POD_UDT>::value, true);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<POD_union_UDT>::value, true);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<empty_POD_union_UDT>::value, true);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<nothrow_copy_UDT>::value, true);
#else
// cases we would like to succeed but can't implement in the language:
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<empty_POD_UDT>::value, true, false);
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<POD_UDT>::value, true, false);
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<POD_union_UDT>::value, true, false);
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<empty_POD_union_UDT>::value, true, false);
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<nothrow_copy_UDT>::value, true, false);
#endif
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<nothrow_assign_UDT>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<nothrow_construct_UDT>::value, false);