Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r83206 - in trunk: boost/type_traits libs/type_traits/doc libs/type_traits/test
From: antoshkka_at_[hidden]
Date: 2013-02-28 14:17:50


Author: apolukhin
Date: 2013-02-28 14:17:49 EST (Thu, 28 Feb 2013)
New Revision: 83206
URL: http://svn.boost.org/trac/boost/changeset/83206

Log:
Added new type traits (more documentation, more tests and improved C++11 specific features detection still must to be done) (refs #8189)
Added:
   trunk/boost/type_traits/has_trivial_move_assign.hpp (contents, props changed)
   trunk/boost/type_traits/has_trivial_move_constructor.hpp (contents, props changed)
   trunk/boost/type_traits/is_nothrow_move_assignable.hpp (contents, props changed)
   trunk/boost/type_traits/is_nothrow_move_constructible.hpp (contents, props changed)
   trunk/libs/type_traits/test/has_trivial_move_assign_test.cpp (contents, props changed)
   trunk/libs/type_traits/test/has_trivial_move_constructor_test.cpp (contents, props changed)
   trunk/libs/type_traits/test/is_nothrow_move_assignable_test.cpp (contents, props changed)
   trunk/libs/type_traits/test/is_nothrow_move_constructible_test.cpp (contents, props changed)
Text files modified:
   trunk/boost/type_traits/intrinsics.hpp | 13 +++++++++++++
   trunk/libs/type_traits/doc/intrinsics.qbk | 9 ++++++---
   2 files changed, 19 insertions(+), 3 deletions(-)

Added: trunk/boost/type_traits/has_trivial_move_assign.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/type_traits/has_trivial_move_assign.hpp 2013-02-28 14:17:49 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,57 @@
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// (C) Copyright Eric Friedman 2002-2003.
+// (C) Copyright Antony Polukhin 2013.
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+//
+// See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_TRIVIAL_MOVE_ASSIGN_HPP_INCLUDED
+#define BOOST_TT_HAS_TRIVIAL_MOVE_ASSIGN_HPP_INCLUDED
+
+#include <boost/type_traits/config.hpp>
+#include <boost/type_traits/is_pod.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/is_volatile.hpp>
+#include <boost/type_traits/detail/ice_and.hpp>
+#include <boost/type_traits/detail/ice_not.hpp>
+
+// should be the last #include
+#include <boost/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+namespace detail {
+
+template <typename T>
+struct has_trivial_move_assign_impl
+{
+#ifdef BOOST_HAS_TRIVIAL_MOVE_ASSIGN
+ BOOST_STATIC_CONSTANT(bool, value = (BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T)));
+#else
+ BOOST_STATIC_CONSTANT(bool, value =
+ (::boost::type_traits::ice_and<
+ ::boost::is_pod<T>::value,
+ ::boost::type_traits::ice_not< ::boost::is_const<T>::value >::value,
+ ::boost::type_traits::ice_not< ::boost::is_volatile<T>::value >::value
+ >::value));
+#endif
+};
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_move_assign,T,::boost::detail::has_trivial_move_assign_impl<T>::value)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_move_assign,void,false)
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_move_assign,void const,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_move_assign,void const volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_move_assign,void volatile,false)
+#endif
+
+} // namespace boost
+
+#include <boost/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_HAS_TRIVIAL_MOVE_ASSIGN_HPP_INCLUDED

Added: trunk/boost/type_traits/has_trivial_move_constructor.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/type_traits/has_trivial_move_constructor.hpp 2013-02-28 14:17:49 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,57 @@
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// (C) Copyright Eric Friedman 2002-2003.
+// (C) Copyright Antony Polukhin 2013.
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+//
+// See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_TRIVIAL_MOVE_CONSTRUCTOR_HPP_INCLUDED
+#define BOOST_TT_HAS_TRIVIAL_MOVE_CONSTRUCTOR_HPP_INCLUDED
+
+#include <boost/type_traits/config.hpp>
+#include <boost/type_traits/intrinsics.hpp>
+#include <boost/type_traits/is_pod.hpp>
+#include <boost/type_traits/is_volatile.hpp>
+#include <boost/type_traits/detail/ice_and.hpp>
+#include <boost/type_traits/detail/ice_not.hpp>
+
+// should be the last #include
+#include <boost/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+namespace detail {
+
+template <typename T>
+struct has_trivial_move_ctor_impl
+{
+#ifdef BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR
+ BOOST_STATIC_CONSTANT(bool, value = (BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T)));
+#else
+ BOOST_STATIC_CONSTANT(bool, value =
+ (::boost::type_traits::ice_and<
+ ::boost::is_pod<T>::value,
+ ::boost::type_traits::ice_not< ::boost::is_volatile<T>::value >::value
+ >::value));
+#endif
+};
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_move_constructor,T,::boost::detail::has_trivial_move_ctor_impl<T>::value)
+
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_move_constructor,void,false)
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_move_constructor,void const,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_move_constructor,void const volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_move_constructor,void volatile,false)
+#endif
+
+} // namespace boost
+
+#include <boost/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_HAS_TRIVIAL_MOVE_CONSTRUCTOR_HPP_INCLUDED

Modified: trunk/boost/type_traits/intrinsics.hpp
==============================================================================
--- trunk/boost/type_traits/intrinsics.hpp (original)
+++ trunk/boost/type_traits/intrinsics.hpp 2013-02-28 14:17:49 EST (Thu, 28 Feb 2013)
@@ -24,7 +24,9 @@
 // BOOST_IS_EMPTY(T) should evaluate to true if T is an empty class type (and not a union)
 // BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) should evaluate to true if "T x;" has no effect
 // BOOST_HAS_TRIVIAL_COPY(T) should evaluate to true if T(t) <==> memcpy
+// BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) should evaluate to true if T(boost::move(t)) <==> memcpy
 // BOOST_HAS_TRIVIAL_ASSIGN(T) should evaluate to true if t = u <==> memcpy
+// BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) should evaluate to true if t = boost::move(u) <==> memcpy
 // BOOST_HAS_TRIVIAL_DESTRUCTOR(T) should evaluate to true if ~T() has no effect
 // BOOST_HAS_NOTHROW_CONSTRUCTOR(T) should evaluate to true if "T x;" can not throw
 // BOOST_HAS_NOTHROW_COPY(T) should evaluate to true if T(t) can not throw
@@ -106,6 +108,11 @@
 // This one fails if the default alignment has been changed with /Zp:
 // # define BOOST_ALIGNMENT_OF(T) __alignof(T)
 
+# if defined(_MSC_VER) && (_MSC_VER >= 1700)
+# define BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) (__has_trivial_move_constructor(T) || ( ::boost::is_pod<T>::value && !::boost::is_volatile<T>::value))
+# define BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) (__has_trivial_move_assign(T) || ( ::boost::is_pod<T>::value && !::boost::is_volatile<T>::value))
+# endif
+
 # define BOOST_HAS_TYPE_TRAITS_INTRINSICS
 #endif
 
@@ -183,6 +190,12 @@
 # if __has_feature(is_polymorphic)
 # define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T)
 # endif
+# if __has_feature(has_trivial_move_constructor)
+# define BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) __has_trivial_move_constructor(T)
+# endif
+# if __has_feature(has_trivial_move_assign)
+# define BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) __has_trivial_move_assign(T)
+# endif
 # define BOOST_ALIGNMENT_OF(T) __alignof(T)
 
 # define BOOST_HAS_TYPE_TRAITS_INTRINSICS

Added: trunk/boost/type_traits/is_nothrow_move_assignable.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/type_traits/is_nothrow_move_assignable.hpp 2013-02-28 14:17:49 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,58 @@
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// (C) Copyright Eric Friedman 2002-2003.
+// (C) Copyright Antony Polukhin 2013.
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+//
+// See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_NOTHROW_MOVE_ASSIGNABLE_HPP_INCLUDED
+#define BOOST_TT_IS_NOTHROW_MOVE_ASSIGNABLE_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <boost/type_traits/has_trivial_move_assign.hpp>
+#include <boost/type_traits/has_nothrow_assign.hpp>
+#include <boost/utility/declval.hpp>
+
+// should be the last #include
+#include <boost/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+namespace detail{
+
+template <class T>
+struct is_nothrow_move_assignable_imp{
+#if 0
+ // #ifndef BOOST_NO_CXX11_NOEXCEPT
+ BOOST_STATIC_CONSTANT(bool, value = (
+ ::boost::type_traits::ice_or<
+ ::boost::has_trivial_move_assign<T>::value,
+ BOOST_NOEXCEPT_EXPR(::boost::declval<T>() = ::boost::declval<T>())
+ >::value));
+#else
+ BOOST_STATIC_CONSTANT(bool, value = (
+ ::boost::type_traits::ice_or<
+ ::boost::has_trivial_move_assign<T>::value,
+ ::boost::has_nothrow_assign<T>::value
+ >::value));
+#endif
+};
+
+}
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_nothrow_move_assignable,T,::boost::detail::is_nothrow_move_assignable_imp<T>::value)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_nothrow_move_assignable,void,false)
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_nothrow_move_assignable,void const,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_nothrow_move_assignable,void const volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_nothrow_move_assignable,void volatile,false)
+#endif
+
+} // namespace boost
+
+#include <boost/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_NOTHROW_MOVE_ASSIGNABLE_HPP_INCLUDED

Added: trunk/boost/type_traits/is_nothrow_move_constructible.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/type_traits/is_nothrow_move_constructible.hpp 2013-02-28 14:17:49 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,60 @@
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// (C) Copyright Eric Friedman 2002-2003.
+// (C) Copyright Antony Polukhin 2013.
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+//
+// See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_NOTHROW_MOVE_CONSTRUCTIBLE_HPP_INCLUDED
+#define BOOST_TT_IS_NOTHROW_MOVE_CONSTRUCTIBLE_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <boost/type_traits/has_trivial_move_constructor.hpp>
+#include <boost/type_traits/has_nothrow_copy.hpp>
+#include <boost/type_traits/detail/ice_or.hpp>
+#include <boost/utility/declval.hpp>
+
+// should be the last #include
+#include <boost/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+namespace detail{
+
+template <class T>
+struct is_nothrow_move_constructible_imp{
+#if 0
+ //#ifndef BOOST_NO_CXX11_NOEXCEPT
+ BOOST_STATIC_CONSTANT(bool, value =
+ (::boost::type_traits::ice_or<
+ ::boost::has_trivial_move_constructor<T>::value,
+ BOOST_NOEXCEPT_EXPR(T(::boost::declval<T>()))
+ >::value));
+#else
+ BOOST_STATIC_CONSTANT(bool, value =
+ (::boost::type_traits::ice_or<
+ ::boost::has_trivial_move_constructor<T>::value,
+ ::boost::has_nothrow_copy<T>::value
+ >::value));
+#endif
+};
+
+}
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_nothrow_move_constructible,T,::boost::detail::is_nothrow_move_constructible_imp<T>::value)
+
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_nothrow_move_constructible,void,false)
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_nothrow_move_constructible,void const,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_nothrow_move_constructible,void const volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_nothrow_move_constructible,void volatile,false)
+#endif
+
+} // namespace boost
+
+#include <boost/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_NOTHROW_MOVE_CONSTRUCTIBLE_HPP_INCLUDED

Modified: trunk/libs/type_traits/doc/intrinsics.qbk
==============================================================================
--- trunk/libs/type_traits/doc/intrinsics.qbk (original)
+++ trunk/libs/type_traits/doc/intrinsics.qbk 2013-02-28 14:17:49 EST (Thu, 28 Feb 2013)
@@ -10,9 +10,8 @@
 There are some traits that can not be implemented within the current C++ language:
 to make these traits "just work" with user defined types, some kind of additional
 help from the compiler is required. Currently (April 2008) Visual C++ 8 and 9,
-GNU GCC 4.3 and MWCW 9
-provide the necessary intrinsics, and other compilers will no doubt follow in due
-course.
+GNU GCC 4.3 and MWCW 9 provide at least some of the the necessary intrinsics,
+and other compilers will no doubt follow in due course.
 
 The Following traits classes always need compiler support to do the right thing
 for all types
@@ -22,7 +21,9 @@
 * __is_pod
 * __has_trivial_constructor
 * __has_trivial_copy
+* __has_trivial_move_constructor
 * __has_trivial_assign
+* __has_trivial_move_assign
 * __has_trivial_destructor
 * __has_nothrow_constructor
 * __has_nothrow_copy
@@ -51,7 +52,9 @@
    [[BOOST_IS_EMPTY(T)][Should evaluate to true if T is an empty struct or union]]
    [[BOOST_HAS_TRIVIAL_CONSTRUCTOR(T)][Should evaluate to true if the default constructor for T is trivial (i.e. has no effect)]]
    [[BOOST_HAS_TRIVIAL_COPY(T)][Should evaluate to true if T has a trivial copy constructor (and can therefore be replaced by a call to memcpy)]]
+ [[BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T)][Should evaluate to true if T has a trivial move constructor (and can therefore be replaced by a call to memcpy)]]
    [[BOOST_HAS_TRIVIAL_ASSIGN(T)][Should evaluate to true if T has a trivial assignment operator (and can therefore be replaced by a call to memcpy)]]
+ [[BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T)][Should evaluate to true if T has a trivial move assignment operator (and can therefore be replaced by a call to memcpy)]]
    [[BOOST_HAS_TRIVIAL_DESTRUCTOR(T)][Should evaluate to true if T has a trivial destructor (i.e. ~T() has no effect)]]
    [[BOOST_HAS_NOTHROW_CONSTRUCTOR(T)][Should evaluate to true if `T x;` can not throw]]
    [[BOOST_HAS_NOTHROW_COPY(T)][Should evaluate to true if `T(t)` can not throw]]

Added: trunk/libs/type_traits/test/has_trivial_move_assign_test.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/type_traits/test/has_trivial_move_assign_test.cpp 2013-02-28 14:17:49 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,210 @@
+
+// (C) Copyright John Maddock 2000.
+// (C) Copyright Antony Polukhin 2013.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test.hpp"
+#include "check_integral_constant.hpp"
+#ifdef TEST_STD
+# include <type_traits>
+#else
+# include <boost/type_traits/has_trivial_move_assign.hpp>
+#endif
+
+TT_TEST_BEGIN(has_trivial_move_assign)
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<bool>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<bool const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<bool volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<bool const volatile>::value, false);
+#endif
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<signed char>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<signed char const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<signed char volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<signed char const volatile>::value, false);
+#endif
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned char>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<char>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned char const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<char const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned char volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<char volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned char const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<char const volatile>::value, false);
+#endif
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned short>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<short>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned short const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<short const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned short volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<short volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned short const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<short const volatile>::value, false);
+#endif
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned int>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<int>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned int const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<int const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned int volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<int volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned int const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<int const volatile>::value, false);
+#endif
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned long>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<long>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned long const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<long const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned long volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<long volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned long const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<long const volatile>::value, false);
+#endif
+#ifdef BOOST_HAS_LONG_LONG
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign< ::boost::ulong_long_type>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign< ::boost::long_long_type>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign< ::boost::ulong_long_type const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign< ::boost::long_long_type const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign< ::boost::ulong_long_type volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign< ::boost::long_long_type volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign< ::boost::ulong_long_type const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign< ::boost::long_long_type const volatile>::value, false);
+#endif
+#endif
+
+#ifdef BOOST_HAS_MS_INT64
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned __int8>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<__int8>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned __int8 const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<__int8 const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned __int8 volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<__int8 volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned __int8 const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<__int8 const volatile>::value, false);
+#endif
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned __int16>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<__int16>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned __int16 const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<__int16 const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned __int16 volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<__int16 volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned __int16 const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<__int16 const volatile>::value, false);
+#endif
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned __int32>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<__int32>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned __int32 const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<__int32 const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned __int32 volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<__int32 volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned __int32 const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<__int32 const volatile>::value, false);
+#endif
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned __int64>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<__int64>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned __int64 const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<__int64 const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned __int64 volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<__int64 volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned __int64 const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<__int64 const volatile>::value, false);
+#endif
+#endif
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<float>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<float const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<float volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<float const volatile>::value, false);
+#endif
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<double>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<double const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<double volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<double const volatile>::value, false);
+#endif
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<long double>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<long double const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<long double volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<long double const volatile>::value, false);
+#endif
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<int>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<void*>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<int*const>::value, false);
+#endif
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<f1>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<f2>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<f3>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<mf1>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<mf2>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<mf3>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<mp>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<cmf>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<enum_UDT>::value, true);
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<int&>::value, false);
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<int&&>::value, false);
+#endif
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<const int&>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<int[2]>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<int[3][2]>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<int[2][4][5][6][3]>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<UDT>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<empty_UDT>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<void>::value, false);
+// cases we would like to succeed but can't implement in the language:
+BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<empty_POD_UDT>::value, true, false);
+BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<POD_UDT>::value, true, false);
+BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<POD_union_UDT>::value, true, false);
+BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<empty_POD_union_UDT>::value, true, false);
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<trivial_except_assign>::value, false);
+BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<trivial_except_destroy>::value, true, false);
+BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<trivial_except_construct>::value, true, false);
+BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<trivial_except_copy>::value, true, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<wrap<trivial_except_assign> >::value, false);
+BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<wrap<trivial_except_destroy> >::value, true, false);
+BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<wrap<trivial_except_construct> >::value, true, false);
+BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<wrap<trivial_except_copy> >::value, true, false);
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<test_abc1>::value, false);
+
+TT_TEST_END
+
+
+

Added: trunk/libs/type_traits/test/has_trivial_move_constructor_test.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/type_traits/test/has_trivial_move_constructor_test.cpp 2013-02-28 14:17:49 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,215 @@
+
+// (C) Copyright John Maddock 2000.
+// (C) Copyright Antony Polukhin 2013.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test.hpp"
+#include "check_integral_constant.hpp"
+#ifdef TEST_STD
+# include <type_traits>
+#else
+# include <boost/type_traits/has_trivial_move_constructor.hpp>
+#endif
+
+TT_TEST_BEGIN(has_trivial_move_constructor)
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<bool>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<bool const>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<bool volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<bool const volatile>::value, false);
+#endif
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<signed char>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<signed char const>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<signed char volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<signed char const volatile>::value, false);
+#endif
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned char>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<char>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned char const>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<char const>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned char volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<char volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned char const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<char const volatile>::value, false);
+#endif
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned short>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<short>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned short const>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<short const>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned short volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<short volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned short const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<short const volatile>::value, false);
+#endif
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned int>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<int>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned int const>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<int const>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned int volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<int volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned int const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<int const volatile>::value, false);
+#endif
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned long>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<long>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned long const>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<long const>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned long volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<long volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned long const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<long const volatile>::value, false);
+#endif
+#ifdef BOOST_HAS_LONG_LONG
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor< ::boost::ulong_long_type>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor< ::boost::long_long_type>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor< ::boost::ulong_long_type const>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor< ::boost::long_long_type const>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor< ::boost::ulong_long_type volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor< ::boost::long_long_type volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor< ::boost::ulong_long_type const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor< ::boost::long_long_type const volatile>::value, false);
+#endif
+#endif
+
+#ifdef BOOST_HAS_MS_INT64
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned __int8>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<__int8>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned __int8 const>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<__int8 const>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned __int8 volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<__int8 volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned __int8 const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<__int8 const volatile>::value, false);
+#endif
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned __int16>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<__int16>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned __int16 const>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<__int16 const>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned __int16 volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<__int16 volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned __int16 const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<__int16 const volatile>::value, false);
+#endif
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned __int32>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<__int32>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned __int32 const>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<__int32 const>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned __int32 volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<__int32 volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned __int32 const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<__int32 const volatile>::value, false);
+#endif
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned __int64>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<__int64>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned __int64 const>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<__int64 const>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned __int64 volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<__int64 volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned __int64 const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<__int64 const volatile>::value, false);
+#endif
+#endif
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<float>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<float const>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<float volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<float const volatile>::value, false);
+#endif
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<double>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<double const>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<double volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<double const volatile>::value, false);
+#endif
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<long double>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<long double const>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<long double volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<long double const volatile>::value, false);
+#endif
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<int>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<void*>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<int*const>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<f1>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<f2>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<f3>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<mf1>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<mf2>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<mf3>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<mp>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<cmf>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<enum_UDT>::value, true);
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<int&>::value, false);
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<int&&>::value, false);
+#endif
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<const int&>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<int[2]>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<int[3][2]>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<int[2][4][5][6][3]>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<UDT>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<void>::value, false);
+// cases we would like to succeed but can't implement in the language:
+BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<empty_POD_UDT>::value, true, false);
+BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<POD_UDT>::value, true, false);
+BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<POD_union_UDT>::value, true, false);
+BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<empty_POD_union_UDT>::value, true, false);
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<trivial_except_copy>::value, false);
+BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<trivial_except_destroy>::value, true, false);
+BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<trivial_except_construct>::value, true, false);
+BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<trivial_except_assign>::value, true, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<wrap<trivial_except_copy> >::value, false);
+BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<wrap<trivial_except_destroy> >::value, true, false);
+BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<wrap<trivial_except_construct> >::value, true, false);
+BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<wrap<trivial_except_assign> >::value, true, false);
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<test_abc1>::value, false);
+
+TT_TEST_END
+
+
+
+
+
+
+
+

Added: trunk/libs/type_traits/test/is_nothrow_move_assignable_test.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/type_traits/test/is_nothrow_move_assignable_test.cpp 2013-02-28 14:17:49 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,212 @@
+
+// (C) Copyright John Maddock 2000.
+// (C) Copyright Antony Polukhin 2013.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test.hpp"
+#include "check_integral_constant.hpp"
+#ifdef TEST_STD
+# include <type_traits>
+#else
+# include <boost/type_traits/is_nothrow_move_assignable.hpp>
+#endif
+
+TT_TEST_BEGIN(is_nothrow_move_assignable)
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<bool>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<bool const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<bool volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<bool const volatile>::value, false);
+#endif
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<signed char>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<signed char const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<signed char volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<signed char const volatile>::value, false);
+#endif
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned char>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<char>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned char const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<char const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned char volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<char volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned char const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<char const volatile>::value, false);
+#endif
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned short>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<short>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned short const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<short const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned short volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<short volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned short const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<short const volatile>::value, false);
+#endif
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned int>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<int>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned int const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<int const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned int volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<int volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned int const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<int const volatile>::value, false);
+#endif
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned long>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<long>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned long const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<long const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned long volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<long volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned long const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<long const volatile>::value, false);
+#endif
+
+#ifdef BOOST_HAS_LONG_LONG
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable< ::boost::ulong_long_type>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable< ::boost::long_long_type>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable< ::boost::ulong_long_type const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable< ::boost::long_long_type const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable< ::boost::ulong_long_type volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable< ::boost::long_long_type volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable< ::boost::ulong_long_type const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable< ::boost::long_long_type const volatile>::value, false);
+#endif
+#endif
+
+#ifdef BOOST_HAS_MS_INT64
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned __int8>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<__int8>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned __int8 const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<__int8 const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned __int8 volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<__int8 volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned __int8 const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<__int8 const volatile>::value, false);
+#endif
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned __int16>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<__int16>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned __int16 const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<__int16 const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned __int16 volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<__int16 volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned __int16 const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<__int16 const volatile>::value, false);
+#endif
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned __int32>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<__int32>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned __int32 const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<__int32 const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned __int32 volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<__int32 volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned __int32 const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<__int32 const volatile>::value, false);
+#endif
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned __int64>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<__int64>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned __int64 const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<__int64 const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned __int64 volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<__int64 volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned __int64 const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<__int64 const volatile>::value, false);
+#endif
+#endif
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<float>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<float const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<float volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<float const volatile>::value, false);
+#endif
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<double>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<double const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<double volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<double const volatile>::value, false);
+#endif
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<long double>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<long double const>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<long double volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<long double const volatile>::value, false);
+#endif
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<int>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<void*>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<int*const>::value, false);
+#endif
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<f1>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<f2>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<f3>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<mf1>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<mf2>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<mf3>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<mp>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<cmf>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<enum_UDT>::value, true);
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<int&>::value, false);
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<int&&>::value, false);
+#endif
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<const int&>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<int[2]>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<int[3][2]>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<int[2][4][5][6][3]>::value, true);
+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);
+// 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);
+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);
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<test_abc1>::value, false);
+
+TT_TEST_END
+
+
+

Added: trunk/libs/type_traits/test/is_nothrow_move_constructible_test.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/type_traits/test/is_nothrow_move_constructible_test.cpp 2013-02-28 14:17:49 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,208 @@
+
+// (C) Copyright John Maddock 2000.
+// (C) Copyright Antony Polukhin 2013.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include "test.hpp"
+#include "check_integral_constant.hpp"
+#ifdef TEST_STD
+# include <type_traits>
+#else
+# include <boost/type_traits/is_nothrow_move_constructible.hpp>
+#endif
+
+TT_TEST_BEGIN(is_nothrow_move_constructible)
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<bool>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<bool const>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<bool volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<bool const volatile>::value, false);
+#endif
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<signed char>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<signed char const>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<signed char volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<signed char const volatile>::value, false);
+#endif
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned char>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<char>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned char const>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<char const>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned char volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<char volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned char const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<char const volatile>::value, false);
+#endif
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned short>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<short>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned short const>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<short const>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned short volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<short volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned short const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<short const volatile>::value, false);
+#endif
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned int>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<int>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned int const>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<int const>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned int volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<int volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned int const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<int const volatile>::value, false);
+#endif
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned long>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<long>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned long const>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<long const>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned long volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<long volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned long const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<long const volatile>::value, false);
+#endif
+
+#ifdef BOOST_HAS_LONG_LONG
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible< ::boost::ulong_long_type>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible< ::boost::long_long_type>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible< ::boost::ulong_long_type const>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible< ::boost::long_long_type const>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible< ::boost::ulong_long_type volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible< ::boost::long_long_type volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible< ::boost::ulong_long_type const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible< ::boost::long_long_type const volatile>::value, false);
+#endif
+#endif
+
+#ifdef BOOST_HAS_MS_INT64
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned __int8>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<__int8>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned __int8 const>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<__int8 const>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned __int8 volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<__int8 volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned __int8 const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<__int8 const volatile>::value, false);
+#endif
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned __int16>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<__int16>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned __int16 const>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<__int16 const>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned __int16 volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<__int16 volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned __int16 const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<__int16 const volatile>::value, false);
+#endif
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned __int32>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<__int32>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned __int32 const>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<__int32 const>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned __int32 volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<__int32 volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned __int32 const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<__int32 const volatile>::value, false);
+#endif
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned __int64>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<__int64>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned __int64 const>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<__int64 const>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned __int64 volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<__int64 volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned __int64 const volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<__int64 const volatile>::value, false);
+#endif
+#endif
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<float>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<float const>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<float volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<float const volatile>::value, false);
+#endif
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<double>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<double const>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<double volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<double const volatile>::value, false);
+#endif
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<long double>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<long double const>::value, true);
+#ifndef TEST_STD
+// unspecified behaviour:
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<long double volatile>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<long double const volatile>::value, false);
+#endif
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<int>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<void*>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<int*const>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<f1>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<f2>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<f3>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<mf1>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<mf2>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<mf3>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<mp>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<cmf>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<enum_UDT>::value, true);
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<int&>::value, false);
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<int&&>::value, false);
+#endif
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<const int&>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<int[2]>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<int[3][2]>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<int[2][4][5][6][3]>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<UDT>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<void>::value, false);
+// 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);
+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);
+
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<test_abc1>::value, false);
+
+TT_TEST_END
+
+
+


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