|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r83365 - trunk/libs/type_traits/test
From: antoshkka_at_[hidden]
Date: 2013-03-08 10:52:48
Author: apolukhin
Date: 2013-03-08 10:52:46 EST (Fri, 08 Mar 2013)
New Revision: 83365
URL: http://svn.boost.org/trac/boost/changeset/83365
Log:
Added C++11 specific tests for implementation of is_nothrow_move_constructible and is_nothrow_move_assignable traits (refs #8189).
Text files modified:
trunk/libs/type_traits/test/is_nothrow_move_assignable_test.cpp | 4 ++++
trunk/libs/type_traits/test/is_nothrow_move_constructible_test.cpp | 4 ++++
trunk/libs/type_traits/test/test.hpp | 12 ++++++++++++
3 files changed, 20 insertions(+), 0 deletions(-)
Modified: trunk/libs/type_traits/test/is_nothrow_move_assignable_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/is_nothrow_move_assignable_test.cpp (original)
+++ trunk/libs/type_traits/test/is_nothrow_move_assignable_test.cpp 2013-03-08 10:52:46 EST (Fri, 08 Mar 2013)
@@ -204,6 +204,10 @@
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);
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_NOEXCEPT)
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<nothrow_move_UDT>::value, true);
+#endif
+
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<test_abc1>::value, false);
TT_TEST_END
Modified: trunk/libs/type_traits/test/is_nothrow_move_constructible_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/is_nothrow_move_constructible_test.cpp (original)
+++ trunk/libs/type_traits/test/is_nothrow_move_constructible_test.cpp 2013-03-08 10:52:46 EST (Fri, 08 Mar 2013)
@@ -200,6 +200,10 @@
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);
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_NOEXCEPT)
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<nothrow_move_UDT>::value, true);
+#endif
+
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<test_abc1>::value, false);
TT_TEST_END
Modified: trunk/libs/type_traits/test/test.hpp
==============================================================================
--- trunk/libs/type_traits/test/test.hpp (original)
+++ trunk/libs/type_traits/test/test.hpp 2013-03-08 10:52:46 EST (Fri, 08 Mar 2013)
@@ -276,6 +276,18 @@
{ return true; }
};
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+struct nothrow_move_UDT
+{
+ nothrow_move_UDT();
+ nothrow_move_UDT(nothrow_move_UDT&&) throw();
+ nothrow_move_UDT& operator=(nothrow_move_UDT&&) throw();
+ bool operator==(const nothrow_move_UDT&)const
+ { return true; }
+};
+#endif
+
+
struct nothrow_construct_UDT
{
nothrow_construct_UDT()throw();
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk