Tentative fix for git issue #56: failing has_nothrow_copy with deleted constructor

This commit is contained in:
John Maddock
2018-05-07 09:47:06 +01:00
parent 547263c001
commit 59e81bca80
2 changed files with 9 additions and 0 deletions

View File

@ -266,7 +266,9 @@
# define BOOST_HAS_TRIVIAL_ASSIGN(T) ((__has_trivial_assign(T) BOOST_INTEL_TT_OPTS) && ! ::boost::is_volatile<T>::value && ! ::boost::is_const<T>::value)
# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) BOOST_INTEL_TT_OPTS)
# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) BOOST_INTEL_TT_OPTS)
#if (__GNUC__ * 100 + __GNUC_MINOR__) != 407
# define BOOST_HAS_NOTHROW_COPY(T) ((__has_nothrow_copy(T) BOOST_INTEL_TT_OPTS) && !is_volatile<T>::value && !is_reference<T>::value && !is_array<T>::value)
#endif
# define BOOST_HAS_NOTHROW_ASSIGN(T) ((__has_nothrow_assign(T) BOOST_INTEL_TT_OPTS) && !is_volatile<T>::value && !is_const<T>::value && !is_array<T>::value)
#endif
# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T)

View File

@ -21,6 +21,12 @@ private:
#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS
struct delete_move
{
delete_move();
delete_move(const delete_move&&) = delete;
};
struct delete_copy
{
delete_copy();
@ -233,6 +239,7 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<test_abc1>::value, false);
#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<delete_copy>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<delete_move>::value, false);
#endif
#ifndef BOOST_NO_CXX11_NOEXCEPT