Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r83544 - in branches/release/boost/variant: . detail
From: antoshkka_at_[hidden]
Date: 2013-03-24 12:18:12


Author: apolukhin
Date: 2013-03-24 12:18:12 EDT (Sun, 24 Mar 2013)
New Revision: 83544
URL: http://svn.boost.org/trac/boost/changeset/83544

Log:
Merge fom trunk:
* Boost.Variant now uses traits from Boost.TypeTraits instead of its own (fixes #8296)
Removed:
   branches/release/boost/variant/detail/has_nothrow_move.hpp
   branches/release/boost/variant/detail/has_trivial_move.hpp
Text files modified:
   branches/release/boost/variant/detail/visitation_impl.hpp | 4 +-
   branches/release/boost/variant/variant.hpp | 60 ++++++++++++++++++++--------------------
   2 files changed, 32 insertions(+), 32 deletions(-)

Deleted: branches/release/boost/variant/detail/has_nothrow_move.hpp
==============================================================================
--- branches/release/boost/variant/detail/has_nothrow_move.hpp 2013-03-24 12:18:12 EDT (Sun, 24 Mar 2013)
+++ (empty file)
@@ -1,106 +0,0 @@
-
-// (C) Copyright Eric Friedman 2002-2003.
-// Distributed under 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 for most recent version including documentation.
-
-#ifndef BOOST_VARIANT_DETAIL_HAS_NOTHROW_MOVE_HPP_INCLUDED
-#define BOOST_VARIANT_DETAIL_HAS_NOTHROW_MOVE_HPP_INCLUDED
-
-#include "boost/config.hpp" // for STATIC_CONSTANT
-#include "boost/variant/detail/has_trivial_move.hpp"
-#include "boost/type_traits/has_nothrow_copy.hpp"
-#include "boost/type_traits/has_nothrow_assign.hpp"
-
-#include "boost/mpl/and.hpp"
-#include "boost/mpl/or.hpp"
-
-// should be the last #include
-#include "boost/variant/detail/bool_trait_def.hpp"
-
-namespace boost {
-namespace detail { namespace variant {
-
-// TRAIT: has_nothrow_move
-
-template <typename T>
-struct has_nothrow_move_impl
-{
- BOOST_STATIC_CONSTANT(
- bool, value = (
- ::boost::mpl::or_<
- has_trivial_move<T>
- , ::boost::mpl::and_<
- has_nothrow_copy<T>
- , has_nothrow_assign<T>
- >
- >::type::value
- )
- );
-};
-
-BOOST_VARIANT_TT_AUX_BOOL_TRAIT_DEF1(
- has_nothrow_move
- , T
- , (::boost::detail::variant::has_nothrow_move_impl<T>::value)
- )
-
-
-// TRAIT: has_nothrow_move_constructor
-
-template <typename T>
-struct has_nothrow_move_constructor_impl
-{
- BOOST_STATIC_CONSTANT(
- bool, value = (
- ::boost::mpl::or_<
- has_nothrow_move<T>
- , has_trivial_move_constructor<T>
- , has_nothrow_copy<T>
- >::type::value
- )
- );
-};
-
-BOOST_VARIANT_TT_AUX_BOOL_TRAIT_DEF1(
- has_nothrow_move_constructor
- , T
- , (::boost::detail::variant::has_nothrow_move_constructor_impl<T>::value)
- )
-
-
-// TRAIT: has_nothrow_move_assign
-
-template <typename T>
-struct has_nothrow_move_assign_impl
-{
- BOOST_STATIC_CONSTANT(
- bool, value = (
- ::boost::mpl::or_<
- has_nothrow_move<T>
- , has_trivial_move_assign<T>
- , has_nothrow_assign<T>
- >::type::value
- )
- );
-};
-
-BOOST_VARIANT_TT_AUX_BOOL_TRAIT_DEF1(
- has_nothrow_move_assign
- , T
- , (::boost::detail::variant::has_nothrow_move_assign_impl<T>::value)
- )
-
-}} // namespace detail::variant
-
-BOOST_VARIANT_TT_AUX_TRAIT_SUFFIX(1,::boost::detail::variant::has_nothrow_move)
-BOOST_VARIANT_TT_AUX_TRAIT_SUFFIX(1,::boost::detail::variant::has_nothrow_move_constructor)
-BOOST_VARIANT_TT_AUX_TRAIT_SUFFIX(1,::boost::detail::variant::has_nothrow_move_assign)
-
-} // namespace boost
-
-#include "boost/variant/detail/bool_trait_undef.hpp"
-
-#endif // BOOST_VARIANT_DETAIL_HAS_NOTHROW_MOVE_HPP_INCLUDED

Deleted: branches/release/boost/variant/detail/has_trivial_move.hpp
==============================================================================
--- branches/release/boost/variant/detail/has_trivial_move.hpp 2013-03-24 12:18:12 EDT (Sun, 24 Mar 2013)
+++ (empty file)
@@ -1,100 +0,0 @@
-
-// (C) Copyright Eric Friedman 2002-2003.
-// Distributed under 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 for most recent version including documentation.
-
-#ifndef BOOST_VARIANT_DETAIL_HAS_TRIVIAL_MOVE_HPP_INCLUDED
-#define BOOST_VARIANT_DETAIL_HAS_TRIVIAL_MOVE_HPP_INCLUDED
-
-#include "boost/config.hpp" // for STATIC_CONSTANT
-#include "boost/type_traits/has_trivial_copy.hpp"
-#include "boost/type_traits/has_trivial_assign.hpp"
-
-#include "boost/mpl/and.hpp"
-#include "boost/mpl/or.hpp"
-
-// should be the last #include
-#include "boost/variant/detail/bool_trait_def.hpp"
-
-namespace boost {
-namespace detail { namespace variant {
-
-// TRAIT: has_trivial_move
-
-template <typename T>
-struct has_trivial_move_impl
-{
- BOOST_STATIC_CONSTANT(
- bool, value = (
- ::boost::mpl::and_<
- has_trivial_copy<T>
- , has_trivial_assign<T>
- >::type::value
- )
- );
-};
-
-BOOST_VARIANT_TT_AUX_BOOL_TRAIT_DEF1(
- has_trivial_move
- , T
- , (::boost::detail::variant::has_trivial_move_impl<T>::value)
- )
-
-
-// TRAIT: has_trivial_move_constructor
-
-template <typename T>
-struct has_trivial_move_constructor_impl
-{
- BOOST_STATIC_CONSTANT(
- bool, value = (
- ::boost::mpl::or_<
- has_trivial_move<T>
- , has_trivial_copy<T>
- >::type::value
- )
- );
-};
-
-BOOST_VARIANT_TT_AUX_BOOL_TRAIT_DEF1(
- has_trivial_move_constructor
- , T
- , (::boost::detail::variant::has_trivial_move_constructor_impl<T>::value)
- )
-
-
-// TRAIT: has_trivial_move_assign
-
-template <typename T>
-struct has_trivial_move_assign_impl
-{
- BOOST_STATIC_CONSTANT(
- bool, value = (
- ::boost::mpl::or_<
- has_trivial_move<T>
- , has_trivial_assign<T>
- >::type::value
- )
- );
-};
-
-BOOST_VARIANT_TT_AUX_BOOL_TRAIT_DEF1(
- has_trivial_move_assign
- , T
- , (::boost::detail::variant::has_trivial_move_assign_impl<T>::value)
- )
-
-}} // namespace detail::variant
-
-BOOST_VARIANT_TT_AUX_TRAIT_SUFFIX(1,::boost::detail::variant::has_trivial_move)
-BOOST_VARIANT_TT_AUX_TRAIT_SUFFIX(1,::boost::detail::variant::has_trivial_move_constructor)
-BOOST_VARIANT_TT_AUX_TRAIT_SUFFIX(1,::boost::detail::variant::has_trivial_move_assign)
-
-} // namespace boost
-
-#include "boost/variant/detail/bool_trait_undef.hpp"
-
-#endif // BOOST_VARIANT_DETAIL_HAS_TRIVIAL_MOVE_HPP_INCLUDED

Modified: branches/release/boost/variant/detail/visitation_impl.hpp
==============================================================================
--- branches/release/boost/variant/detail/visitation_impl.hpp (original)
+++ branches/release/boost/variant/detail/visitation_impl.hpp 2013-03-24 12:18:12 EDT (Sun, 24 Mar 2013)
@@ -33,7 +33,7 @@
 #include "boost/preprocessor/repeat.hpp"
 #include "boost/type_traits/is_same.hpp"
 #include "boost/type_traits/has_nothrow_copy.hpp"
-#include "boost/variant/detail/has_nothrow_move.hpp"
+#include "boost/type_traits/is_nothrow_move_constructible.hpp"
 
 #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
 # pragma warning (push)
@@ -163,7 +163,7 @@
 {
     typedef typename mpl::or_<
           NoBackupFlag
- , has_nothrow_move_constructor<T>
+ , is_nothrow_move_constructible<T>
         , has_nothrow_copy<T>
>::type never_uses_backup;
 

Modified: branches/release/boost/variant/variant.hpp
==============================================================================
--- branches/release/boost/variant/variant.hpp (original)
+++ branches/release/boost/variant/variant.hpp 2013-03-24 12:18:12 EDT (Sun, 24 Mar 2013)
@@ -35,7 +35,6 @@
 #include "boost/variant/detail/hash_variant.hpp"
 
 #include "boost/variant/detail/generic_result_type.hpp"
-#include "boost/variant/detail/has_nothrow_move.hpp"
 #include "boost/variant/detail/move.hpp"
 
 #include "boost/detail/reference_content.hpp"
@@ -49,6 +48,7 @@
 #include "boost/type_traits/add_const.hpp"
 #include "boost/type_traits/has_nothrow_constructor.hpp"
 #include "boost/type_traits/has_nothrow_copy.hpp"
+#include "boost/type_traits/is_nothrow_move_constructible.hpp"
 #include "boost/type_traits/is_const.hpp"
 #include "boost/type_traits/is_same.hpp"
 #include "boost/type_traits/is_rvalue_reference.hpp"
@@ -759,7 +759,7 @@
     template <typename LhsT>
     void backup_assign_impl(
           LhsT& lhs_content
- , mpl::true_// has_nothrow_move
+ , mpl::true_ // is_nothrow_move_constructible
         )
     {
         // Move lhs content to backup...
@@ -794,7 +794,7 @@
     template <typename LhsT>
     void backup_assign_impl(
           LhsT& lhs_content
- , mpl::false_// has_nothrow_move
+ , mpl::false_ // is_nothrow_move_constructible
         )
     {
         // Backup lhs content...
@@ -834,7 +834,7 @@
         BOOST_VARIANT_AUX_RETURN_VOID_TYPE
     internal_visit(LhsT& lhs_content, int)
     {
- typedef typename has_nothrow_move_constructor<LhsT>::type
+ typedef typename is_nothrow_move_constructible<LhsT>::type
             nothrow_move;
 
         backup_assign_impl( lhs_content, nothrow_move() );
@@ -1811,9 +1811,9 @@
         template <typename RhsT, typename B1, typename B2>
         void assign_impl(
               const RhsT& rhs_content
- , mpl::true_// has_nothrow_copy
- , B1// has_nothrow_move_constructor
- , B2// has_fallback_type
+ , mpl::true_ // has_nothrow_copy
+ , B1 // is_nothrow_move_constructible
+ , B2 // has_fallback_type
             )
         {
             // Destroy lhs's content...
@@ -1830,9 +1830,9 @@
         template <typename RhsT, typename B>
         void assign_impl(
               const RhsT& rhs_content
- , mpl::false_// has_nothrow_copy
- , mpl::true_// has_nothrow_move_constructor
- , B// has_fallback_type
+ , mpl::false_ // has_nothrow_copy
+ , mpl::true_ // is_nothrow_move_constructible
+ , B // has_fallback_type
             )
         {
             // Attempt to make a temporary copy (so as to move it below)...
@@ -1852,9 +1852,9 @@
         template <typename RhsT>
         void assign_impl(
               const RhsT& rhs_content
- , mpl::false_// has_nothrow_copy
- , mpl::false_// has_nothrow_move_constructor
- , mpl::true_// has_fallback_type
+ , mpl::false_ // has_nothrow_copy
+ , mpl::false_ // is_nothrow_move_constructible
+ , mpl::true_ // has_fallback_type
             )
         {
             // Destroy lhs's content...
@@ -1888,9 +1888,9 @@
         template <typename RhsT>
         void assign_impl(
               const RhsT& rhs_content
- , mpl::false_// has_nothrow_copy
- , mpl::false_// has_nothrow_move_constructor
- , mpl::false_// has_fallback_type
+ , mpl::false_ // has_nothrow_copy
+ , mpl::false_ // is_nothrow_move_constructible
+ , mpl::false_ // has_fallback_type
             )
         {
             detail::variant::backup_assigner<wknd_self_t>
@@ -1908,7 +1908,7 @@
                 nothrow_copy;
             typedef typename mpl::or_< // reduces compile-time
                   nothrow_copy
- , detail::variant::has_nothrow_move_constructor<RhsT>
+ , is_nothrow_move_constructible<RhsT>
>::type nothrow_move_constructor;
 
             assign_impl(
@@ -1958,9 +1958,9 @@
         template <typename RhsT, typename B1, typename B2>
         void assign_impl(
               RhsT& rhs_content
- , mpl::true_// has_nothrow_copy
- , mpl::false_// has_nothrow_move_constructor
- , B2// has_fallback_type
+ , mpl::true_ // has_nothrow_copy
+ , mpl::false_ // is_nothrow_move_constructible
+ , B2 // has_fallback_type
             )
         {
             // Destroy lhs's content...
@@ -1977,9 +1977,9 @@
         template <typename RhsT, typename B>
         void assign_impl(
               RhsT& rhs_content
- , mpl::true_// has_nothrow_copy
- , mpl::true_// has_nothrow_move_constructor
- , B// has_fallback_type
+ , mpl::true_ // has_nothrow_copy
+ , mpl::true_ // is_nothrow_move_constructible
+ , B // has_fallback_type
             )
         {
             // ...destroy lhs's content...
@@ -1996,9 +1996,9 @@
         template <typename RhsT>
         void assign_impl(
               RhsT& rhs_content
- , mpl::false_// has_nothrow_copy
- , mpl::false_// has_nothrow_move_constructor
- , mpl::true_// has_fallback_type
+ , mpl::false_ // has_nothrow_copy
+ , mpl::false_ // is_nothrow_move_constructible
+ , mpl::true_ // has_fallback_type
             )
         {
             // Destroy lhs's content...
@@ -2032,9 +2032,9 @@
         template <typename RhsT>
         void assign_impl(
               const RhsT& rhs_content
- , mpl::false_// has_nothrow_copy
- , mpl::false_// has_nothrow_move_constructor
- , mpl::false_// has_fallback_type
+ , mpl::false_ // has_nothrow_copy
+ , mpl::false_ // is_nothrow_move_constructible
+ , mpl::false_ // has_fallback_type
             )
         {
             detail::variant::backup_assigner<wknd_self_t>
@@ -2048,7 +2048,7 @@
             BOOST_VARIANT_AUX_RETURN_VOID_TYPE
         internal_visit(RhsT& rhs_content, int)
         {
- typedef typename detail::variant::has_nothrow_move_constructor<RhsT>::type
+ typedef typename is_nothrow_move_constructible<RhsT>::type
                 nothrow_move_constructor;
             typedef typename mpl::or_< // reduces compile-time
                   nothrow_move_constructor


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