Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r86650 - in branches/release: boost boost/variant boost/variant/detail libs/variant libs/variant/test
From: antoshkka_at_[hidden]
Date: 2013-11-12 05:16:15


Author: apolukhin
Date: 2013-11-12 05:16:15 EST (Tue, 12 Nov 2013)
New Revision: 86650
URL: http://svn.boost.org/trac/boost/changeset/86650

Log:
Merge from trunk:
* dropped support of antique compilers
* fixed issue with ambiguity in swap (fixes #2839)
* added conditional noexcepts to move assignments, default and move constructors (fixes #7911)
* experimental variadic templates support (refs #9163)
* bunch of size optimizations for assignments and move assignments (refs #7960)
* minor changes and size optimizations

Added:
   branches/release/libs/variant/test/variant_swap_test.cpp
      - copied unchanged from r86648, trunk/libs/variant/test/variant_swap_test.cpp
Properties modified:
   branches/release/boost/variant/ (props changed)
   branches/release/boost/variant.hpp (props changed)
   branches/release/libs/variant/ (props changed)
Text files modified:
   branches/release/boost/variant/bad_visit.hpp | 2
   branches/release/boost/variant/detail/apply_visitor_binary.hpp | 8
   branches/release/boost/variant/detail/apply_visitor_delayed.hpp | 2
   branches/release/boost/variant/detail/apply_visitor_unary.hpp | 4
   branches/release/boost/variant/detail/backup_holder.hpp | 6
   branches/release/boost/variant/detail/cast_storage.hpp | 10 -
   branches/release/boost/variant/detail/config.hpp | 1
   branches/release/boost/variant/detail/enable_recursive.hpp | 29 ----
   branches/release/boost/variant/detail/enable_recursive_fwd.hpp | 29 ----
   branches/release/boost/variant/detail/forced_return.hpp | 11
   branches/release/boost/variant/detail/hash_variant.hpp | 2
   branches/release/boost/variant/detail/initializer.hpp | 65 +--------
   branches/release/boost/variant/detail/make_variant_list.hpp | 17 ++
   branches/release/boost/variant/detail/move.hpp | 43 +----
   branches/release/boost/variant/detail/over_sequence.hpp | 37 -----
   branches/release/boost/variant/detail/substitute_fwd.hpp | 1
   branches/release/boost/variant/detail/visitation_impl.hpp | 24 ---
   branches/release/boost/variant/get.hpp | 53 -------
   branches/release/boost/variant/multivisitors.hpp | 2
   branches/release/boost/variant/recursive_variant.hpp | 24 +++
   branches/release/boost/variant/recursive_wrapper_fwd.hpp | 44 ------
   branches/release/boost/variant/static_visitor.hpp | 15 +-
   branches/release/boost/variant/variant.hpp | 263 +++++++++++++--------------------------
   branches/release/boost/variant/variant_fwd.hpp | 60 ++++++++
   branches/release/boost/variant/visitor_ptr.hpp | 2
   branches/release/libs/variant/test/Jamfile.v2 | 8 +
   branches/release/libs/variant/test/rvalue_test.cpp | 40 ++++++
   branches/release/libs/variant/test/variant_reference_test.cpp | 2
   branches/release/libs/variant/test/variant_swap_test.cpp | 90 +++++++++++++
   29 files changed, 373 insertions(+), 521 deletions(-)

Modified: branches/release/boost/variant/bad_visit.hpp
==============================================================================
--- branches/release/boost/variant/bad_visit.hpp Tue Nov 12 04:58:22 2013 (r86649)
+++ branches/release/boost/variant/bad_visit.hpp 2013-11-12 05:16:15 EST (Tue, 12 Nov 2013) (r86650)
@@ -28,7 +28,7 @@
 {
 public: // std::exception interface
 
- virtual const char * what() const throw()
+ virtual const char * what() const BOOST_NOEXCEPT_OR_NOTHROW
     {
         return "boost::bad_visit: "
                "failed visitation using boost::apply_visitor";

Modified: branches/release/boost/variant/detail/apply_visitor_binary.hpp
==============================================================================
--- branches/release/boost/variant/detail/apply_visitor_binary.hpp Tue Nov 12 04:58:22 2013 (r86649)
+++ branches/release/boost/variant/detail/apply_visitor_binary.hpp 2013-11-12 05:16:15 EST (Tue, 12 Nov 2013) (r86650)
@@ -52,7 +52,7 @@
 
 public: // structors
 
- apply_visitor_binary_invoke(Visitor& visitor, Value1& value1)
+ apply_visitor_binary_invoke(Visitor& visitor, Value1& value1) BOOST_NOEXCEPT
         : visitor_(visitor)
         , value1_(value1)
     {
@@ -87,7 +87,7 @@
 
 public: // structors
 
- apply_visitor_binary_unwrap(Visitor& visitor, Visitable2& visitable2)
+ apply_visitor_binary_unwrap(Visitor& visitor, Visitable2& visitable2) BOOST_NOEXCEPT
         : visitor_(visitor)
         , visitable2_(visitable2)
     {
@@ -156,8 +156,6 @@
 // const-visitor version:
 //
 
-#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
-
 template <typename Visitor, typename Visitable1, typename Visitable2>
 inline
     BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(
@@ -175,8 +173,6 @@
     return boost::apply_visitor(unwrapper, visitable1);
 }
 
-#endif // MSVC7 and below exclusion
-
 } // namespace boost
 
 #endif // BOOST_VARIANT_DETAIL_APPLY_VISITOR_BINARY_HPP

Modified: branches/release/boost/variant/detail/apply_visitor_delayed.hpp
==============================================================================
--- branches/release/boost/variant/detail/apply_visitor_delayed.hpp Tue Nov 12 04:58:22 2013 (r86649)
+++ branches/release/boost/variant/detail/apply_visitor_delayed.hpp 2013-11-12 05:16:15 EST (Tue, 12 Nov 2013) (r86650)
@@ -49,7 +49,7 @@
 
 public: // structors
 
- explicit apply_visitor_delayed_t(Visitor& visitor)
+ explicit apply_visitor_delayed_t(Visitor& visitor) BOOST_NOEXCEPT
       : visitor_(visitor)
     {
     }

Modified: branches/release/boost/variant/detail/apply_visitor_unary.hpp
==============================================================================
--- branches/release/boost/variant/detail/apply_visitor_unary.hpp Tue Nov 12 04:58:22 2013 (r86649)
+++ branches/release/boost/variant/detail/apply_visitor_unary.hpp 2013-11-12 05:16:15 EST (Tue, 12 Nov 2013) (r86650)
@@ -66,8 +66,6 @@
 // const-visitor version:
 //
 
-#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
-
 template <typename Visitor, typename Visitable>
 inline
     BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(typename Visitor::result_type)
@@ -76,8 +74,6 @@
     return visitable.apply_visitor(visitor);
 }
 
-#endif // MSVC7 and below exclusion
-
 } // namespace boost
 
 #endif // BOOST_VARIANT_DETAIL_APPLY_VISITOR_UNARY_HPP

Modified: branches/release/boost/variant/detail/backup_holder.hpp
==============================================================================
--- branches/release/boost/variant/detail/backup_holder.hpp Tue Nov 12 04:58:22 2013 (r86649)
+++ branches/release/boost/variant/detail/backup_holder.hpp 2013-11-12 05:16:15 EST (Tue, 12 Nov 2013) (r86650)
@@ -28,7 +28,7 @@
 
 public: // structors
 
- ~backup_holder()
+ ~backup_holder() BOOST_NOEXCEPT
     {
         delete backup_;
     }
@@ -63,12 +63,12 @@
 
 public: // queries
 
- T& get()
+ T& get() BOOST_NOEXCEPT
     {
         return *backup_;
     }
 
- const T& get() const
+ const T& get() const BOOST_NOEXCEPT
     {
         return *backup_;
     }

Modified: branches/release/boost/variant/detail/cast_storage.hpp
==============================================================================
--- branches/release/boost/variant/detail/cast_storage.hpp Tue Nov 12 04:58:22 2013 (r86649)
+++ branches/release/boost/variant/detail/cast_storage.hpp 2013-11-12 05:16:15 EST (Tue, 12 Nov 2013) (r86650)
@@ -25,19 +25,13 @@
 //
 
 template <typename T>
-inline T& cast_storage(
- void* storage
- BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(T)
- )
+inline T& cast_storage(void* storage)
 {
     return *static_cast<T*>(storage);
 }
 
 template <typename T>
-inline const T& cast_storage(
- const void* storage
- BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(T)
- )
+inline const T& cast_storage(const void* storage)
 {
     return *static_cast<const T*>(storage);
 }

Modified: branches/release/boost/variant/detail/config.hpp
==============================================================================
--- branches/release/boost/variant/detail/config.hpp Tue Nov 12 04:58:22 2013 (r86649)
+++ branches/release/boost/variant/detail/config.hpp 2013-11-12 05:16:15 EST (Tue, 12 Nov 2013) (r86650)
@@ -21,7 +21,6 @@
 //
 #if BOOST_WORKAROUND(__MWERKS__, <= 0x3201) \
  || BOOST_WORKAROUND(BOOST_INTEL, <= 700) \
- || BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
  && !defined(BOOST_VARIANT_AUX_BROKEN_CONSTRUCTOR_TEMPLATE_ORDERING)
 # define BOOST_VARIANT_AUX_BROKEN_CONSTRUCTOR_TEMPLATE_ORDERING
 #endif

Modified: branches/release/boost/variant/detail/enable_recursive.hpp
==============================================================================
--- branches/release/boost/variant/detail/enable_recursive.hpp Tue Nov 12 04:58:22 2013 (r86649)
+++ branches/release/boost/variant/detail/enable_recursive.hpp 2013-11-12 05:16:15 EST (Tue, 12 Nov 2013) (r86650)
@@ -78,7 +78,6 @@
 // See boost/variant/detail/enable_recursive_fwd.hpp for more information.
 //
 
-#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
 
 template <typename T, typename RecursiveVariant, typename NoWrapper>
 struct enable_recursive
@@ -112,34 +111,6 @@
 
 };
 
-#else // defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
-
-template <typename T, typename RecursiveVariant, typename NoWrapper>
-struct enable_recursive
-{
-private: // helpers, for metafunction result (below)
-
- typedef typename BOOST_VARIANT_AUX_ENABLE_RECURSIVE_IMPL(
- T, RecursiveVariant, ::boost::recursive_variant_
- )::type t_;
-
-public: // metafunction result
-
- // [Wrap with recursive_wrapper only if rebind really changed something:]
- typedef typename mpl::if_<
- mpl::or_<
- NoWrapper
- , is_same< t_,T >
- , is_reference<t_>
- , is_pointer<t_>
- >
- , t_
- , boost::recursive_wrapper<t_>
- >::type type;
-
-};
-
-#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION workaround
 
 ///////////////////////////////////////////////////////////////////////////////
 // (detail) metafunction class quoted_enable_recursive

Modified: branches/release/boost/variant/detail/enable_recursive_fwd.hpp
==============================================================================
--- branches/release/boost/variant/detail/enable_recursive_fwd.hpp Tue Nov 12 04:58:22 2013 (r86649)
+++ branches/release/boost/variant/detail/enable_recursive_fwd.hpp 2013-11-12 05:16:15 EST (Tue, 12 Nov 2013) (r86650)
@@ -17,11 +17,7 @@
 
 #include "boost/mpl/bool_fwd.hpp"
 
-#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
 # include "boost/mpl/bool.hpp"
-#else
-# include "boost/type_traits/is_base_and_derived.hpp"
-#endif
 
 namespace boost {
 namespace detail { namespace variant {
@@ -32,7 +28,6 @@
 // Signifies that the variant should perform recursive substituion.
 //
 
-#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
 
 template <typename T>
 struct recursive_flag
@@ -40,20 +35,6 @@
     typedef T type;
 };
 
-#else // defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
-
-struct recursive_flag_tag
-{
-};
-
-template <typename T>
-struct recursive_flag
- : recursive_flag_tag
-{
- typedef T type;
-};
-
-#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION workaround
 
 ///////////////////////////////////////////////////////////////////////////////
 // (detail) metafunction is_recursive_flag
@@ -61,7 +42,6 @@
 // Signifies that the variant should perform recursive substituion.
 //
 
-#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
 
 template <typename T>
 struct is_recursive_flag
@@ -75,15 +55,6 @@
 {
 };
 
-#else // defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
-
-template <typename T>
-struct is_recursive_flag
- : is_base_and_derived< recursive_flag_tag,T >
-{
-};
-
-#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION workaround
 
 ///////////////////////////////////////////////////////////////////////////////
 // (detail) metafunction enable_recursive

Modified: branches/release/boost/variant/detail/forced_return.hpp
==============================================================================
--- branches/release/boost/variant/detail/forced_return.hpp Tue Nov 12 04:58:22 2013 (r86649)
+++ branches/release/boost/variant/detail/forced_return.hpp 2013-11-12 05:16:15 EST (Tue, 12 Nov 2013) (r86650)
@@ -17,7 +17,7 @@
 #include "boost/variant/detail/generic_result_type.hpp"
 #include "boost/assert.hpp"
 
-#if !defined(BOOST_MSVC) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+#if !defined(BOOST_MSVC)
 # include "boost/type_traits/remove_reference.hpp"
 #endif
 
@@ -32,13 +32,12 @@
 //
 
 #if !defined(BOOST_MSVC) \
- && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
  && !defined(BOOST_NO_VOID_RETURNS)
 
 // "standard" implementation:
 
 template <typename T>
-inline T forced_return( BOOST_EXPLICIT_TEMPLATE_TYPE(T) )
+inline T forced_return()
 {
     // logical error: should never be here! (see above)
     BOOST_ASSERT(false);
@@ -49,7 +48,7 @@
 }
 
 template <>
-inline void forced_return<void>( BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(void) )
+inline void forced_return<void>()
 {
     // logical error: should never be here! (see above)
     BOOST_ASSERT(false);
@@ -66,7 +65,7 @@
 template <typename T>
 inline
     BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(T)
-forced_return( BOOST_EXPLICIT_TEMPLATE_TYPE(T) )
+forced_return()
 {
     // logical error: should never be here! (see above)
     BOOST_ASSERT(false);
@@ -88,7 +87,7 @@
 template <typename T>
 inline
     BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(T)
-forced_return( BOOST_EXPLICIT_TEMPLATE_TYPE(T) )
+forced_return()
 {
     // logical error: should never be here! (see above)
     BOOST_ASSERT(false);

Modified: branches/release/boost/variant/detail/hash_variant.hpp
==============================================================================
--- branches/release/boost/variant/detail/hash_variant.hpp Tue Nov 12 04:58:22 2013 (r86649)
+++ branches/release/boost/variant/detail/hash_variant.hpp 2013-11-12 05:16:15 EST (Tue, 12 Nov 2013) (r86650)
@@ -14,7 +14,7 @@
 #ifndef BOOST_HASH_VARIANT_FUNCTION_HPP
 #define BOOST_HASH_VARIANT_FUNCTION_HPP
 
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
 # pragma once
 #endif
 

Modified: branches/release/boost/variant/detail/initializer.hpp
==============================================================================
--- branches/release/boost/variant/detail/initializer.hpp Tue Nov 12 04:58:22 2013 (r86649)
+++ branches/release/boost/variant/detail/initializer.hpp 2013-11-12 05:16:15 EST (Tue, 12 Nov 2013) (r86650)
@@ -152,12 +152,12 @@
 
 #else // defined(BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE)
 
-# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
-
+ // Obsolete. Remove.
     #define BOOST_VARIANT_AUX_PP_INITIALIZER_TEMPLATE_PARAMS \
           BOOST_VARIANT_ENUM_PARAMS(typename recursive_enabled_T) \
     /**/
 
+ // Obsolete. Remove.
     #define BOOST_VARIANT_AUX_PP_INITIALIZER_DEFINE_PARAM_T(N) \
         typedef typename unwrap_recursive< \
               BOOST_PP_CAT(recursive_enabled_T,N) \
@@ -167,25 +167,18 @@
>::param_type BOOST_PP_CAT(param_T,N); \
     /**/
 
-# else // MSVC7 and below
-
- #define BOOST_VARIANT_AUX_PP_INITIALIZER_TEMPLATE_PARAMS \
- BOOST_VARIANT_ENUM_PARAMS(typename recursive_enabled_T) \
- , BOOST_VARIANT_ENUM_PARAMS(typename param_T) \
- /**/
-
- #define BOOST_VARIANT_AUX_PP_INITIALIZER_DEFINE_PARAM_T(N) \
- /**/
-
-# endif // MSVC7 and below workaround
-
-template < BOOST_VARIANT_AUX_PP_INITIALIZER_TEMPLATE_PARAMS >
+template < BOOST_VARIANT_ENUM_PARAMS(typename recursive_enabled_T) >
 struct preprocessor_list_initializer
 {
 public: // static functions
 
     #define BOOST_VARIANT_AUX_PP_INITIALIZE_FUNCTION(z,N,_) \
- BOOST_VARIANT_AUX_PP_INITIALIZER_DEFINE_PARAM_T(N) \
+ typedef typename unwrap_recursive< \
+ BOOST_PP_CAT(recursive_enabled_T,N) \
+ >::type BOOST_PP_CAT(public_T,N); \
+ typedef typename call_traits< \
+ BOOST_PP_CAT(public_T,N) \
+ >::param_type BOOST_PP_CAT(param_T,N); \
         static int initialize( \
               void* dest \
             , BOOST_PP_CAT(param_T,N) operand \
@@ -210,22 +203,6 @@
 
 };
 
-# if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
-
-#if !defined(BOOST_VARIANT_AUX_ECHO)
-# define BOOST_VARIANT_AUX_ECHO(z,N,token) token
-#endif
-
-template <>
-struct preprocessor_list_initializer<
- BOOST_PP_ENUM(BOOST_VARIANT_LIMIT_TYPES, BOOST_VARIANT_AUX_ECHO, int)
- , BOOST_PP_ENUM(BOOST_VARIANT_LIMIT_TYPES, BOOST_VARIANT_AUX_ECHO, const int)
- >
-{
-};
-
-# endif // BOOST_MPL_CFG_MSVC_60_ETI_BUG workaround
-
 #endif // BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE workaround
 
 }} // namespace detail::variant
@@ -256,34 +233,14 @@
 
 #else // defined(BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE)
 
-# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
-
- #define BOOST_VARIANT_AUX_PP_INITIALIZER_TEMPLATE_ARGS(typename_base) \
- BOOST_VARIANT_ENUM_PARAMS(typename_base) \
- /**/
-
-# else // MSVC7 and below
-
- #define BOOST_VARIANT_AUX_PP_INITIALIZER_ENUM_PARAM_TYPE(z,N,T) \
- ::boost::call_traits< \
- ::boost::unwrap_recursive<BOOST_PP_CAT(T,N)>::type \
- >::param_type \
- /**/
-
+ // Obsolete. Remove.
     #define BOOST_VARIANT_AUX_PP_INITIALIZER_TEMPLATE_ARGS(typename_base) \
           BOOST_VARIANT_ENUM_PARAMS(typename_base) \
- , BOOST_PP_ENUM( \
- BOOST_VARIANT_LIMIT_TYPES \
- , BOOST_VARIANT_AUX_PP_INITIALIZER_ENUM_PARAM_TYPE \
- , typename_base \
- ) \
         /**/
 
-# endif // MSVC7 workaround
-
 #define BOOST_VARIANT_AUX_INITIALIZER_T( mpl_seq, typename_base ) \
     ::boost::detail::variant::preprocessor_list_initializer< \
- BOOST_VARIANT_AUX_PP_INITIALIZER_TEMPLATE_ARGS(typename_base) \
+ BOOST_VARIANT_ENUM_PARAMS(typename_base) \
> \
     /**/
 

Modified: branches/release/boost/variant/detail/make_variant_list.hpp
==============================================================================
--- branches/release/boost/variant/detail/make_variant_list.hpp Tue Nov 12 04:58:22 2013 (r86649)
+++ branches/release/boost/variant/detail/make_variant_list.hpp 2013-11-12 05:16:15 EST (Tue, 12 Nov 2013) (r86650)
@@ -3,8 +3,8 @@
 // See http://www.boost.org for updates, documentation, and revision history.
 //-----------------------------------------------------------------------------
 //
-// Copyright (c) 2002-2003
-// Eric Friedman, Itay Maman
+// Copyright (c) 2002-2003 Eric Friedman, Itay Maman
+// Copyright (c) 2013 Antony Polukhin
 //
 // Distributed under the Boost Software License, Version 1.0. (See
 // accompanying file LICENSE_1_0.txt or copy at
@@ -31,6 +31,17 @@
 // Rationale: see class template convert_void (variant_fwd.hpp) and using-
 // declaration workaround (below).
 //
+
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && defined(BOOST_VARIANT_USE_VARIADIC_TEMPLATES)
+
+template < typename... T >
+struct make_variant_list
+{
+ typedef typename mpl::list< T... >::type type;
+};
+
+#else
+
 template < BOOST_VARIANT_ENUM_PARAMS(typename T) >
 struct make_variant_list
 {
@@ -54,6 +65,8 @@
 
 };
 
+#endif // BOOST_NO_CXX11_VARIADIC_TEMPLATES
+
 }} // namespace detail::variant
 } // namespace boost
 

Modified: branches/release/boost/variant/detail/move.hpp
==============================================================================
--- branches/release/boost/variant/detail/move.hpp Tue Nov 12 04:58:22 2013 (r86649)
+++ branches/release/boost/variant/detail/move.hpp 2013-11-12 05:16:15 EST (Tue, 12 Nov 2013) (r86650)
@@ -5,6 +5,7 @@
 //
 // Copyright (c) 2002-2003 Eric Friedman
 // Copyright (c) 2002 by Andrei Alexandrescu
+// Copyright (c) 2013 Antony Polukhin
 //
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0. (See accompanying file
@@ -26,8 +27,7 @@
 #include "boost/detail/workaround.hpp"
 #include "boost/move/move.hpp"
 
-namespace boost {
-namespace detail { namespace variant {
+namespace boost { namespace detail { namespace variant {
 
 using boost::move;
 
@@ -38,47 +38,30 @@
 // types and on non-conforming compilers.
 //
 
-#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) \
- || BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(2))
+namespace move_swap_fallback {
 
-// [Indicate that move_swap by overload is disabled...]
-#define BOOST_NO_MOVE_SWAP_BY_OVERLOAD
-
-// [...and provide straight swap-by-move implementation:]
-template <typename T>
-inline void move_swap(T& lhs, T& rhs)
+template <typename T1, typename T2>
+inline void swap(T1& lhs, T2& rhs)
 {
- T tmp( boost::detail::variant::move(lhs) );
+ T1 tmp( boost::detail::variant::move(lhs) );
     lhs = boost::detail::variant::move(rhs);
     rhs = boost::detail::variant::move(tmp);
 }
 
-#else// !workaround
-
-namespace detail { namespace move_swap {
-
-template <typename T>
-inline void swap(T& lhs, T& rhs)
-{
- T tmp( boost::detail::variant::move(lhs) );
- lhs = boost::detail::variant::move(rhs);
- rhs = boost::detail::variant::move(tmp);
-}
-
-}} // namespace detail::move_swap
+} // namespace move_swap_fallback
 
 template <typename T>
 inline void move_swap(T& lhs, T& rhs)
 {
- using detail::move_swap::swap;
-
+#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP)
+ move_swap_fallback::swap(lhs, rhs);
+#else
+ using move_swap_fallback::swap;
     swap(lhs, rhs);
+#endif
 }
 
-#endif // workaround
-
-}} // namespace detail::variant
-} // namespace boost
+}}} // namespace boost::detail::variant
 
 #endif // BOOST_VARIANT_DETAIL_MOVE_HPP
 

Modified: branches/release/boost/variant/detail/over_sequence.hpp
==============================================================================
--- branches/release/boost/variant/detail/over_sequence.hpp Tue Nov 12 04:58:22 2013 (r86649)
+++ branches/release/boost/variant/detail/over_sequence.hpp 2013-11-12 05:16:15 EST (Tue, 12 Nov 2013) (r86650)
@@ -16,12 +16,6 @@
 #define BOOST_VARIANT_DETAIL_OVER_SEQUENCE_HPP
 
 #include "boost/mpl/aux_/config/ctps.hpp"
-#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
-# include "boost/mpl/eval_if.hpp"
-# include "boost/mpl/bool.hpp"
-# include "boost/mpl/identity.hpp"
-# include "boost/type.hpp"
-#endif
 
 
 namespace boost {
@@ -44,7 +38,6 @@
 // Indicates whether the specified type is of form over_sequence<...> or not.
 //
 
-#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
 
 template <typename T>
 struct is_over_sequence
@@ -58,36 +51,6 @@
 {
 };
 
-#else // defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
-
-typedef char (&yes_over_sequence_t)[1];
-typedef char (&no_over_sequence_t)[2];
-
-no_over_sequence_t is_over_sequence_test(...);
-
-template<typename T>
-yes_over_sequence_t is_over_sequence_test(
- type< ::boost::detail::variant::over_sequence<T> >
- );
-
-template<typename T>
-struct is_over_sequence_impl
-{
- BOOST_STATIC_CONSTANT(bool, value = (
- sizeof(is_over_sequence_test(type<T>()))
- == sizeof(yes_over_sequence_t)
- ));
-};
-
-template <typename T>
-struct is_over_sequence
- : mpl::bool_<
- ::boost::detail::variant::is_over_sequence_impl<T>::value
- >
-{
-};
-
-#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION workaround
 
 }} // namespace detail::variant
 } // namespace boost

Modified: branches/release/boost/variant/detail/substitute_fwd.hpp
==============================================================================
--- branches/release/boost/variant/detail/substitute_fwd.hpp Tue Nov 12 04:58:22 2013 (r86649)
+++ branches/release/boost/variant/detail/substitute_fwd.hpp 2013-11-12 05:16:15 EST (Tue, 12 Nov 2013) (r86650)
@@ -28,7 +28,6 @@
 #include "boost/mpl/aux_/config/ttp.hpp"
 
 #if defined(BOOST_NO_TEMPLATE_TEMPLATE_PARAMETERS) \
- || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
  && !defined(BOOST_VARIANT_DETAIL_NO_SUBSTITUTE)
 # define BOOST_VARIANT_DETAIL_NO_SUBSTITUTE
 #endif

Modified: branches/release/boost/variant/detail/visitation_impl.hpp
==============================================================================
--- branches/release/boost/variant/detail/visitation_impl.hpp Tue Nov 12 04:58:22 2013 (r86649)
+++ branches/release/boost/variant/detail/visitation_impl.hpp 2013-11-12 05:16:15 EST (Tue, 12 Nov 2013) (r86650)
@@ -67,7 +67,6 @@
 // "Never ending" iterator range facilitates visitation_impl unrolling.
 //
 
-#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
 
 template <typename Iter, typename LastIter>
 struct visitation_impl_step
@@ -87,29 +86,6 @@
     typedef visitation_impl_step next;
 };
 
-#else // defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
-
-template <typename Iter, typename LastIter>
-struct visitation_impl_step
-{
- typedef typename mpl::eval_if<
- is_same<Iter, LastIter>
- , mpl::identity<apply_visitor_unrolled>
- , Iter
- >::type type;
-
- typedef typename mpl::eval_if<
- is_same<type, apply_visitor_unrolled> //is_same<Iter, LastIter>
- , mpl::identity<LastIter>
- , mpl::next<Iter>
- >::type next_iter;
-
- typedef visitation_impl_step<
- next_iter, LastIter
- > next;
-};
-
-#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION workaround
 
 ///////////////////////////////////////////////////////////////////////////////
 // (detail) function template visitation_impl_invoke

Modified: branches/release/boost/variant/get.hpp
==============================================================================
--- branches/release/boost/variant/get.hpp Tue Nov 12 04:58:22 2013 (r86649)
+++ branches/release/boost/variant/get.hpp 2013-11-12 05:16:15 EST (Tue, 12 Nov 2013) (r86650)
@@ -24,12 +24,6 @@
 #include "boost/type_traits/add_reference.hpp"
 #include "boost/type_traits/add_pointer.hpp"
 
-#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
-# include "boost/mpl/bool.hpp"
-# include "boost/mpl/or.hpp"
-# include "boost/type_traits/is_same.hpp"
-#endif
-
 namespace boost {
 
 //////////////////////////////////////////////////////////////////////////
@@ -78,59 +72,22 @@
 
 public: // visitor interfaces
 
-#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
-
- pointer operator()(reference operand) const
- {
- return boost::addressof(operand);
- }
-
- template <typename U>
- pointer operator()(const U&) const
- {
- return static_cast<pointer>(0);
- }
-
-#else // MSVC6
-
-private: // helpers, for visitor interfaces (below)
-
- pointer execute_impl(reference operand, mpl::true_) const
+ pointer operator()(reference operand) const BOOST_NOEXCEPT
     {
         return boost::addressof(operand);
     }
 
     template <typename U>
- pointer execute_impl(const U& operand, mpl::false_) const
+ pointer operator()(const U&) const BOOST_NOEXCEPT
     {
         return static_cast<pointer>(0);
     }
-
-public: // visitor interfaces
-
- template <typename U>
- pointer operator()(U& operand) const
- {
- // MSVC6 finds normal implementation (above) ambiguous,
- // so we must explicitly disambiguate
-
- typedef typename mpl::or_<
- is_same<U, T>
- , is_same<const U, T>
- >::type U_is_T;
-
- return execute_impl(operand, U_is_T());
- }
-
-#endif // MSVC6 workaround
-
 };
 
 }} // namespace detail::variant
 
 #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0551))
-# define BOOST_VARIANT_AUX_GET_EXPLICIT_TEMPLATE_TYPE(t) \
- BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t)
+# define BOOST_VARIANT_AUX_GET_EXPLICIT_TEMPLATE_TYPE(t)
 #else
 # define BOOST_VARIANT_AUX_GET_EXPLICIT_TEMPLATE_TYPE(t) \
     , t* = 0
@@ -142,7 +99,7 @@
 get(
       boost::variant< BOOST_VARIANT_ENUM_PARAMS(T) >* operand
       BOOST_VARIANT_AUX_GET_EXPLICIT_TEMPLATE_TYPE(U)
- )
+ ) BOOST_NOEXCEPT
 {
     typedef typename add_pointer<U>::type U_ptr;
     if (!operand) return static_cast<U_ptr>(0);
@@ -157,7 +114,7 @@
 get(
       const boost::variant< BOOST_VARIANT_ENUM_PARAMS(T) >* operand
       BOOST_VARIANT_AUX_GET_EXPLICIT_TEMPLATE_TYPE(U)
- )
+ ) BOOST_NOEXCEPT
 {
     typedef typename add_pointer<const U>::type U_ptr;
     if (!operand) return static_cast<U_ptr>(0);

Modified: branches/release/boost/variant/multivisitors.hpp
==============================================================================
--- branches/release/boost/variant/multivisitors.hpp Tue Nov 12 04:58:22 2013 (r86649)
+++ branches/release/boost/variant/multivisitors.hpp 2013-11-12 05:16:15 EST (Tue, 12 Nov 2013) (r86650)
@@ -12,7 +12,7 @@
 #ifndef BOOST_VARIANT_MULTIVISITORS_HPP
 #define BOOST_VARIANT_MULTIVISITORS_HPP
 
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
 # pragma once
 #endif
 

Modified: branches/release/boost/variant/recursive_variant.hpp
==============================================================================
--- branches/release/boost/variant/recursive_variant.hpp Tue Nov 12 04:58:22 2013 (r86649)
+++ branches/release/boost/variant/recursive_variant.hpp 2013-11-12 05:16:15 EST (Tue, 12 Nov 2013) (r86650)
@@ -3,8 +3,8 @@
 // See http://www.boost.org for updates, documentation, and revision history.
 //-----------------------------------------------------------------------------
 //
-// Copyright (c) 2003
-// Eric Friedman
+// Copyright (c) 2003 Eric Friedman
+// Copyright (c) 2013 Antony Polukhin
 //
 // Distributed under the Boost Software License, Version 1.0. (See
 // accompanying file LICENSE_1_0.txt or copy at
@@ -116,6 +116,23 @@
       BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(Arity)
>
 {
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && defined(BOOST_VARIANT_USE_VARIADIC_TEMPLATES)
+
+ typedef ::boost::variant<
+ typename enable_recursive<
+ T0
+ , RecursiveVariant
+ , mpl::true_
+ >::type,
+ typename enable_recursive<
+ TN
+ , RecursiveVariant
+ , mpl::true_
+ >::type...
+ > type;
+
+#else
+
 private: // helpers, for metafunction result (below)
 
     #define BOOST_VARIANT_AUX_ENABLE_RECURSIVE_TYPEDEFS(z,N,_) \
@@ -137,6 +154,7 @@
 public: // metafunction result
 
     typedef ::boost::variant< BOOST_VARIANT_ENUM_PARAMS(wknd_T) > type;
+#endif
 };
 
 #else // defined(BOOST_VARIANT_DETAIL_NO_SUBSTITUTE)
@@ -176,9 +194,7 @@
 {
 private: // precondition assertions
 
-#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
     BOOST_STATIC_ASSERT(( ::boost::mpl::is_sequence<Types>::value ));
-#endif
 
 public: // metafunction result
 

Modified: branches/release/boost/variant/recursive_wrapper_fwd.hpp
==============================================================================
--- branches/release/boost/variant/recursive_wrapper_fwd.hpp Tue Nov 12 04:58:22 2013 (r86649)
+++ branches/release/boost/variant/recursive_wrapper_fwd.hpp 2013-11-12 05:16:15 EST (Tue, 12 Nov 2013) (r86650)
@@ -16,12 +16,6 @@
 #define BOOST_VARIANT_RECURSIVE_WRAPPER_FWD_HPP
 
 #include "boost/mpl/aux_/config/ctps.hpp"
-#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
-# include "boost/mpl/eval_if.hpp"
-# include "boost/mpl/bool.hpp"
-# include "boost/mpl/identity.hpp"
-# include "boost/type.hpp"
-#endif
 
 #include "boost/mpl/aux_/lambda_support.hpp"
 
@@ -56,7 +50,6 @@
 
 namespace detail {
 
-#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
 
 template <typename T>
 struct is_recursive_wrapper_impl
@@ -70,28 +63,6 @@
 {
 };
 
-#else // defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
-
-typedef char (&yes_recursive_wrapper_t)[1];
-typedef char (&no_recursive_wrapper_t)[2];
-
-no_recursive_wrapper_t is_recursive_wrapper_test(...);
-
-template<typename T>
-yes_recursive_wrapper_t is_recursive_wrapper_test(
- type< ::boost::recursive_wrapper<T> >
- );
-
-template<typename T>
-struct is_recursive_wrapper_impl
-{
- BOOST_STATIC_CONSTANT(bool, value = (
- sizeof(is_recursive_wrapper_test(type<T>()))
- == sizeof(yes_recursive_wrapper_t)
- ));
-};
-
-#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION workaround
 
 } // namespace detail
 
@@ -107,7 +78,6 @@
 // If specified type T matches recursive_wrapper<U>, then U; else T.
 //
 
-#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
 
 template <typename T>
 struct unwrap_recursive
@@ -125,20 +95,6 @@
     BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,unwrap_recursive,(T))
 };
 
-#else // defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
-
-template <typename T>
-struct unwrap_recursive
- : mpl::eval_if<
- is_recursive_wrapper<T>
- , T
- , mpl::identity< T >
- >
-{
- BOOST_MPL_AUX_LAMBDA_SUPPORT(1,unwrap_recursive,(T))
-};
-
-#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION workaround
 
 } // namespace boost
 

Modified: branches/release/boost/variant/static_visitor.hpp
==============================================================================
--- branches/release/boost/variant/static_visitor.hpp Tue Nov 12 04:58:22 2013 (r86649)
+++ branches/release/boost/variant/static_visitor.hpp 2013-11-12 05:16:15 EST (Tue, 12 Nov 2013) (r86650)
@@ -19,10 +19,6 @@
 #include "boost/mpl/if.hpp"
 #include "boost/type_traits/is_base_and_derived.hpp"
 
-#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
-# include "boost/type_traits/is_same.hpp"
-#endif
-
 // should be the last #include
 #include "boost/type_traits/detail/bool_trait_def.hpp"
 
@@ -52,10 +48,13 @@
     typedef R result_type;
 
 protected: // for use as base class only
-
- static_visitor() { }
- ~static_visitor() { }
-
+#ifndef BOOST_NO_DEFAULTED_FUNCTIONS
+ static_visitor() = default;
+ ~static_visitor() = default;
+#else
+ static_visitor() BOOST_NOEXCEPT { }
+ ~static_visitor() BOOST_NOEXCEPT { }
+#endif
 };
 
 //////////////////////////////////////////////////////////////////////////

Modified: branches/release/boost/variant/variant.hpp
==============================================================================
--- branches/release/boost/variant/variant.hpp Tue Nov 12 04:58:22 2013 (r86649)
+++ branches/release/boost/variant/variant.hpp 2013-11-12 05:16:15 EST (Tue, 12 Nov 2013) (r86650)
@@ -23,7 +23,6 @@
 #endif // BOOST_NO_TYPEID
 
 #include "boost/variant/detail/config.hpp"
-#include "boost/mpl/aux_/config/eti.hpp"
 #include "boost/mpl/aux_/value_wknd.hpp"
 
 #include "boost/variant/variant_fwd.hpp"
@@ -219,26 +218,33 @@
 
 };
 
-#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
+#ifndef BOOST_NO_CXX11_NOEXCEPT
+///////////////////////////////////////////////////////////////////////////////
+// (detail) metafunction is_variant_move_noexcept_constructible
+//
+// Returns true_type if all the types are nothrow move constructible.
+//
+template <class Types>
+struct is_variant_move_noexcept_constructible {
+ typedef typename boost::mpl::find_if<
+ Types, mpl::not_<boost::is_nothrow_move_constructible<boost::mpl::_1> >
+ >::type iterator_t;
 
-template<>
-struct find_fallback_type<int>
-{
- typedef mpl::pair< no_fallback_type,no_fallback_type > type;
+ typedef typename boost::mpl::end<Types>::type end_t;
+ typedef typename boost::is_same<
+ iterator_t, end_t
+ >::type type;
 };
 
-#endif // BOOST_MPL_CFG_MSVC_60_ETI_BUG workaround
-
-#ifndef BOOST_NO_CXX11_NOEXCEPT
 ///////////////////////////////////////////////////////////////////////////////
-// (detail) metafunction is_variant_move_noexcept
+// (detail) metafunction is_variant_move_noexcept_assignable
 //
 // Returns true_type if all the types are nothrow move constructible.
 //
 template <class Types>
-struct is_variant_move_noexcept {
+struct is_variant_move_noexcept_assignable {
     typedef typename boost::mpl::find_if<
- Types, mpl::not_<boost::is_nothrow_move_constructible<boost::mpl::_1> >
+ Types, mpl::not_<boost::is_nothrow_move_assignable<boost::mpl::_1> >
>::type iterator_t;
 
     typedef typename boost::mpl::end<Types>::type end_t;
@@ -289,37 +295,12 @@
 
 public: // metafunction result
 
-#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
-
     typedef ::boost::aligned_storage<
           BOOST_MPL_AUX_VALUE_WKND(max_size)::value
         , BOOST_MPL_AUX_VALUE_WKND(max_alignment)::value
> type;
-
-#else // MSVC7 and below
-
- BOOST_STATIC_CONSTANT(std::size_t, msvc_max_size_c = max_size::value);
- BOOST_STATIC_CONSTANT(std::size_t, msvc_max_alignment_c = max_alignment::value);
-
- typedef ::boost::aligned_storage<
- msvc_max_size_c
- , msvc_max_alignment_c
- > type;
-
-#endif // MSVC workaround
-
-};
-
-#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
-
-template<>
-struct make_storage<int,int>
-{
- typedef int type;
 };
 
-#endif // BOOST_MPL_CFG_MSVC_60_ETI_BUG workaround
-
 ///////////////////////////////////////////////////////////////////////////////
 // (detail) class destroyer
 //
@@ -332,9 +313,9 @@
 
     template <typename T>
         BOOST_VARIANT_AUX_RETURN_VOID_TYPE
- internal_visit(T& operand, int) const
+ internal_visit(T& operand, int) const BOOST_NOEXCEPT
     {
- operand.~T();
+ operand.~T(); // must be noexcept
 
 #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0551)) || \
     BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
@@ -358,8 +339,6 @@
     : public static_visitor<T&>
 {
 
-#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
-
 public: // visitor interface
 
     T& operator()(T& operand) const BOOST_NOEXCEPT
@@ -637,8 +616,6 @@
     {
     }
 
-#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
-
 public: // visitor interface
 
     bool operator()(T& lhs)
@@ -653,33 +630,6 @@
         return false;
     }
 
-#else // MSVC6
-
-private: // helpers, for visitor interface (below)
-
- bool execute(T& lhs, mpl::true_)
- {
- lhs = rhs_;
- return true;
- }
-
- template <typename U>
- bool execute(U&, mpl::false_)
- {
- return false;
- }
-
-public: // visitor interface
-
- template <typename U>
- bool operator()(U& lhs)
- {
- typedef typename is_same<U,T>::type U_is_T;
- return execute(lhs, U_is_T());
- }
-
-#endif // MSVC6 workaround
-
 #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
 private:
     // silence MSVC warning C4512: assignment operator could not be generated
@@ -709,8 +659,6 @@
     {
     }
 
-#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
-
 public: // visitor interface
 
     bool operator()(T& lhs)
@@ -725,19 +673,6 @@
         return false;
     }
 
-#else // MSVC6
-
-public: // visitor interface
-
- template <typename U>
- bool operator()(U& lhs)
- {
- // MSVC6 can not use direct_mover class
- return direct_assigner(rhs_)(lhs);
- }
-
-#endif // MSVC6 workaround
-
 #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
 private:
     // silence MSVC warning C4512: assignment operator could not be generated
@@ -897,7 +832,7 @@
 
 public: // structors
 
- explicit swap_with(Variant& toswap)
+ explicit swap_with(Variant& toswap) BOOST_NOEXCEPT
         : toswap_(toswap)
     {
     }
@@ -1321,9 +1256,14 @@
>::type storage_t;
 
 #ifndef BOOST_NO_CXX11_NOEXCEPT
- typedef typename detail::variant::is_variant_move_noexcept<
+ typedef typename detail::variant::is_variant_move_noexcept_constructible<
+ internal_types
+ > variant_move_noexcept_constructible;
+
+ typedef typename detail::variant::is_variant_move_noexcept_assignable<
         internal_types
- > variant_move_noexcept;
+ > variant_move_noexcept_assignable;
+
 #endif
 
 private: // helpers, for representation (below)
@@ -1404,7 +1344,7 @@
     {
     };
 
- void destroy_content()
+ void destroy_content() BOOST_NOEXCEPT
     {
         detail::variant::destroyer visitor;
         this->internal_apply_visitor(visitor);
@@ -1417,8 +1357,13 @@
         destroy_content();
     }
 
- variant()
+ variant() BOOST_NOEXCEPT_IF(boost::has_nothrow_constructor<internal_T0>::value)
     {
+#ifdef _MSC_VER
+#pragma warning( push )
+// behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized
+#pragma warning( disable : 4345 )
+#endif
         // NOTE TO USER :
         // Compile error from here indicates that the first bound
         // type is not default-constructible, and so variant cannot
@@ -1426,6 +1371,9 @@
         //
         new( storage_.address() ) internal_T0();
         indicate_which(0); // zero is the index of the first bounded type
+#ifdef _MSC_VER
+#pragma warning( pop )
+#endif
     }
 
 private: // helpers, for structors, cont. (below)
@@ -1804,7 +1752,7 @@
     }
     
 #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
- variant(variant&& operand) BOOST_NOEXCEPT_IF(variant_move_noexcept::type::value)
+ variant(variant&& operand) BOOST_NOEXCEPT_IF(variant_move_noexcept_constructible::type::value)
     {
         // Move the value of operand into *this...
         detail::variant::move_into visitor( storage_.address() );
@@ -1831,10 +1779,10 @@
     class assigner
         : public static_visitor<>
     {
- private: // representation
+ protected: // representation
 
         variant& lhs_;
- int rhs_which_;
+ const int rhs_which_;
 
     public: // structors
 
@@ -1844,7 +1792,7 @@
         {
         }
 
- private: // helpers, for internal visitor interface (below)
+ protected: // helpers, for internal visitor interface (below)
 
         template <typename RhsT, typename B1, typename B2>
         void assign_impl(
@@ -1852,7 +1800,7 @@
             , mpl::true_ // has_nothrow_copy
             , B1 // is_nothrow_move_constructible
             , B2 // has_fallback_type
- )
+ ) const BOOST_NOEXCEPT
         {
             // Destroy lhs's content...
             lhs_.destroy_content(); // nothrow
@@ -1871,7 +1819,7 @@
             , mpl::false_ // has_nothrow_copy
             , mpl::true_ // is_nothrow_move_constructible
             , B // has_fallback_type
- )
+ ) const
         {
             // Attempt to make a temporary copy (so as to move it below)...
             RhsT temp(rhs_content);
@@ -1887,13 +1835,24 @@
             lhs_.indicate_which(rhs_which_); // nothrow
         }
 
+ void construct_fallback() const BOOST_NOEXCEPT {
+ // In case of failure, default-construct fallback type in lhs's storage...
+ new (lhs_.storage_.address())
+ fallback_type_; // nothrow
+
+ // ...indicate construction of fallback type...
+ lhs_.indicate_which(
+ BOOST_MPL_AUX_VALUE_WKND(fallback_type_index_)::value
+ ); // nothrow
+ }
+
         template <typename RhsT>
         void assign_impl(
               const RhsT& rhs_content
             , mpl::false_ // has_nothrow_copy
             , mpl::false_ // is_nothrow_move_constructible
             , mpl::true_ // has_fallback_type
- )
+ ) const
         {
             // Destroy lhs's content...
             lhs_.destroy_content(); // nothrow
@@ -1906,14 +1865,7 @@
             }
             BOOST_CATCH (...)
             {
- // In case of failure, default-construct fallback type in lhs's storage...
- new (lhs_.storage_.address())
- fallback_type_; // nothrow
-
- // ...indicate construction of fallback type...
- lhs_.indicate_which(
- BOOST_MPL_AUX_VALUE_WKND(fallback_type_index_)::value
- ); // nothrow
+ construct_fallback();
 
                 // ...and rethrow:
                 BOOST_RETHROW;
@@ -1930,7 +1882,7 @@
             , mpl::false_ // has_nothrow_copy
             , mpl::false_ // is_nothrow_move_constructible
             , mpl::false_ // has_fallback_type
- )
+ ) const
         {
             detail::variant::backup_assigner<wknd_self_t>
                 visitor(lhs_, rhs_which_, rhs_content);
@@ -1941,7 +1893,7 @@
 
         template <typename RhsT>
             BOOST_VARIANT_AUX_RETURN_VOID_TYPE
- internal_visit(const RhsT& rhs_content, int)
+ internal_visit(const RhsT& rhs_content, int) const
         {
             typedef typename has_nothrow_copy<RhsT>::type
                 nothrow_copy;
@@ -1977,59 +1929,45 @@
     //
 
     class move_assigner
- : public static_visitor<>
+ : public assigner
     {
- private: // representation
-
- variant& lhs_;
- int rhs_which_;
-
     public: // structors
 
         move_assigner(variant& lhs, int rhs_which) BOOST_NOEXCEPT
- : lhs_(lhs)
- , rhs_which_(rhs_which)
+ : assigner(lhs, rhs_which)
         {
         }
 
     private: // helpers, for internal visitor interface (below)
-
+
         template <typename RhsT, typename B2>
         void assign_impl(
               RhsT& rhs_content
             , mpl::true_ // has_nothrow_copy
             , mpl::false_ // is_nothrow_move_constructible
             , B2 // has_fallback_type
- )
+ ) const BOOST_NOEXCEPT
         {
- // Destroy lhs's content...
- lhs_.destroy_content(); // nothrow
-
- // ...copy rhs content into lhs's storage...
- new(lhs_.storage_.address())
- RhsT( rhs_content ); // nothrow
-
- // ...and indicate new content type:
- lhs_.indicate_which(rhs_which_); // nothrow
+ assigner::assign_impl(rhs_content, mpl::true_(), mpl::false_(), B2());
         }
 
- template <typename RhsT, typename B>
+ template <typename RhsT, typename B, typename B2>
         void assign_impl(
               RhsT& rhs_content
- , mpl::true_ // has_nothrow_copy
+ , B // has_nothrow_copy
             , mpl::true_ // is_nothrow_move_constructible
- , B // has_fallback_type
- )
+ , B2 // has_fallback_type
+ ) const BOOST_NOEXCEPT
         {
             // ...destroy lhs's content...
- lhs_.destroy_content(); // nothrow
+ assigner::lhs_.destroy_content(); // nothrow
 
             // ...move the rhs_content into lhs's storage...
- new(lhs_.storage_.address())
+ new(assigner::lhs_.storage_.address())
                 RhsT( detail::variant::move(rhs_content) ); // nothrow
 
             // ...and indicate new content type:
- lhs_.indicate_which(rhs_which_); // nothrow
+ assigner::lhs_.indicate_which(assigner::rhs_which_); // nothrow
         }
 
         template <typename RhsT>
@@ -2038,27 +1976,20 @@
             , mpl::false_ // has_nothrow_copy
             , mpl::false_ // is_nothrow_move_constructible
             , mpl::true_ // has_fallback_type
- )
+ ) const
         {
             // Destroy lhs's content...
- lhs_.destroy_content(); // nothrow
+ assigner::lhs_.destroy_content(); // nothrow
 
             BOOST_TRY
             {
                 // ...and attempt to copy rhs's content into lhs's storage:
- new(lhs_.storage_.address())
+ new(assigner::lhs_.storage_.address())
                     RhsT( detail::variant::move(rhs_content) );
             }
             BOOST_CATCH (...)
             {
- // In case of failure, default-construct fallback type in lhs's storage...
- new (lhs_.storage_.address())
- fallback_type_; // nothrow
-
- // ...indicate construction of fallback type...
- lhs_.indicate_which(
- BOOST_MPL_AUX_VALUE_WKND(fallback_type_index_)::value
- ); // nothrow
+ assigner::construct_fallback();
 
                 // ...and rethrow:
                 BOOST_RETHROW;
@@ -2066,27 +1997,25 @@
             BOOST_CATCH_END
 
             // In the event of success, indicate new content type:
- lhs_.indicate_which(rhs_which_); // nothrow
+ assigner::lhs_.indicate_which(assigner::rhs_which_); // nothrow
         }
-
+
         template <typename RhsT>
         void assign_impl(
- const RhsT& rhs_content
+ RhsT& rhs_content
             , mpl::false_ // has_nothrow_copy
             , mpl::false_ // is_nothrow_move_constructible
             , mpl::false_ // has_fallback_type
- )
+ ) const
         {
- detail::variant::backup_assigner<wknd_self_t>
- visitor(lhs_, rhs_which_, rhs_content);
- lhs_.internal_apply_visitor(visitor);
+ assigner::assign_impl(rhs_content, mpl::false_(), mpl::false_(), mpl::false_());
         }
 
     public: // internal visitor interfaces
 
         template <typename RhsT>
             BOOST_VARIANT_AUX_RETURN_VOID_TYPE
- internal_visit(RhsT& rhs_content, int)
+ internal_visit(RhsT& rhs_content, int) const
         {
             typedef typename is_nothrow_move_constructible<RhsT>::type
                 nothrow_move_constructor;
@@ -2196,7 +2125,7 @@
 #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
     template <class T>
     typename boost::enable_if_c<boost::is_rvalue_reference<T&&>::value && !boost::is_const<T>::value, variant& >::type
- operator=(T&& rhs)
+ operator=(T&& rhs)
     {
         move_assign( detail::variant::move(rhs) );
         return *this;
@@ -2218,7 +2147,10 @@
     }
 
 #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
- variant& operator=(variant&& rhs) // BOOST_NOEXCEPT_IF(variant_move_noexcept::type::value && all move assign operators are noexcept)
+ variant& operator=(variant&& rhs)
+#if !defined(__GNUC__) || (__GNUC__ != 4) || (__GNUC_MINOR__ > 6)
+ BOOST_NOEXCEPT_IF(variant_move_noexcept_constructible::type::value && variant_move_noexcept_assignable::type::value)
+#endif
     {
         variant_assign( detail::variant::move(rhs) );
         return *this;
@@ -2264,33 +2196,18 @@
 
 public: // prevent comparison with foreign types
 
-#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
-
+// Obsolete. Remove.
 # define BOOST_VARIANT_AUX_FAIL_COMPARISON_RETURN_TYPE \
     void
 
-#else // MSVC7
-
- //
- // MSVC7 gives error about return types for above being different than
- // the true comparison operator overloads:
- //
-
-# define BOOST_VARIANT_AUX_FAIL_COMPARISON_RETURN_TYPE \
- bool
-
-#endif // MSVC7 workaround
-
     template <typename U>
- BOOST_VARIANT_AUX_FAIL_COMPARISON_RETURN_TYPE
- operator==(const U&) const
+ void operator==(const U&) const
     {
         BOOST_STATIC_ASSERT( false && sizeof(U) );
     }
 
     template <typename U>
- BOOST_VARIANT_AUX_FAIL_COMPARISON_RETURN_TYPE
- operator<(const U&) const
+ void operator<(const U&) const
     {
         BOOST_STATIC_ASSERT( false && sizeof(U) );
     }
@@ -2423,9 +2340,7 @@
 {
 private: // precondition assertions
 
-#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
     BOOST_STATIC_ASSERT(( ::boost::mpl::is_sequence<Types>::value ));
-#endif
 
 public: // metafunction result
 

Modified: branches/release/boost/variant/variant_fwd.hpp
==============================================================================
--- branches/release/boost/variant/variant_fwd.hpp Tue Nov 12 04:58:22 2013 (r86649)
+++ branches/release/boost/variant/variant_fwd.hpp 2013-11-12 05:16:15 EST (Tue, 12 Nov 2013) (r86650)
@@ -3,8 +3,8 @@
 // See http://www.boost.org for updates, documentation, and revision history.
 //-----------------------------------------------------------------------------
 //
-// Copyright (c) 2003
-// Eric Friedman, Itay Maman
+// Copyright (c) 2003 Eric Friedman, Itay Maman
+// Copyright (c) 2013 Antony Polukhin
 //
 // Distributed under the Boost Software License, Version 1.0. (See
 // accompanying file LICENSE_1_0.txt or copy at
@@ -71,6 +71,54 @@
 # define BOOST_VARIANT_NO_FULL_RECURSIVE_VARIANT_SUPPORT
 #endif
 
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && defined(BOOST_VARIANT_USE_VARIADIC_TEMPLATES)
+#include <boost/preprocessor/seq/size.hpp>
+
+#define BOOST_VARIANT_CLASS_OR_TYPENAME_TO_SEQ_class class)(
+#define BOOST_VARIANT_CLASS_OR_TYPENAME_TO_SEQ_typename typename)(
+
+#define BOOST_VARIANT_CLASS_OR_TYPENAME_TO_VARIADIC_class class...
+#define BOOST_VARIANT_CLASS_OR_TYPENAME_TO_VARIADIC_typename typename...
+
+#define ARGS_VARIADER_1(x) x ## N...
+#define ARGS_VARIADER_2(x) BOOST_VARIANT_CLASS_OR_TYPENAME_TO_VARIADIC_ ## x ## N
+
+#define BOOST_VARIANT_MAKE_VARIADIC(sequence, x) BOOST_VARIANT_MAKE_VARIADIC_I(BOOST_PP_SEQ_SIZE(sequence), x)
+#define BOOST_VARIANT_MAKE_VARIADIC_I(argscount, x) BOOST_VARIANT_MAKE_VARIADIC_II(argscount, x)
+#define BOOST_VARIANT_MAKE_VARIADIC_II(argscount, orig) ARGS_VARIADER_ ## argscount(orig)
+
+///////////////////////////////////////////////////////////////////////////////
+// BOOST_VARIANT_ENUM_PARAMS and BOOST_VARIANT_ENUM_SHIFTED_PARAMS
+//
+// Convenience macro for enumeration of variant params.
+// When variadic templates are available expands:
+// BOOST_VARIANT_ENUM_PARAMS(class Something) => class Something0, class... SomethingN
+// BOOST_VARIANT_ENUM_PARAMS(typename Something) => typename Something0, typename... SomethingN
+// BOOST_VARIANT_ENUM_PARAMS(Something) => Something0, SomethingN...
+// BOOST_VARIANT_ENUM_PARAMS(Something) => Something0, SomethingN...
+// BOOST_VARIANT_ENUM_SHIFTED_PARAMS(class Something) => class... SomethingN
+// BOOST_VARIANT_ENUM_SHIFTED_PARAMS(typename Something) => typename... SomethingN
+// BOOST_VARIANT_ENUM_SHIFTED_PARAMS(Something) => SomethingN...
+// BOOST_VARIANT_ENUM_SHIFTED_PARAMS(Something) => SomethingN...
+//
+// Rationale: Cleaner, simpler code for clients of variant library. Minimal
+// code modifications to move from C++03 to C++11.
+//
+// Without !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && defined(BOOST_VARIANT_USE_VARIADIC_TEMPLATES)
+// will be used BOOST_VARIANT_ENUM_PARAMS and BOOST_VARIANT_ENUM_SHIFTED_PARAMS from below `#else`
+//
+
+#define BOOST_VARIANT_ENUM_PARAMS(x) \
+ x ## 0, \
+ BOOST_VARIANT_MAKE_VARIADIC( (BOOST_VARIANT_CLASS_OR_TYPENAME_TO_SEQ_ ## x), x) \
+ /**/
+
+#define BOOST_VARIANT_ENUM_SHIFTED_PARAMS(x) \
+ BOOST_VARIANT_MAKE_VARIADIC( (BOOST_VARIANT_CLASS_OR_TYPENAME_TO_SEQ_ ## x), x) \
+ /**/
+
+#else
+
 ///////////////////////////////////////////////////////////////////////////////
 // macro BOOST_VARIANT_RECURSIVE_VARIANT_MAX_ARITY
 //
@@ -100,6 +148,7 @@
 #define BOOST_VARIANT_ENUM_SHIFTED_PARAMS( param ) \
     BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_VARIANT_LIMIT_TYPES, param)
 
+#endif // BOOST_NO_CXX11_VARIADIC_TEMPLATES
 
 namespace boost {
 
@@ -168,6 +217,11 @@
 
 }} // namespace detail::variant
 
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && defined(BOOST_VARIANT_USE_VARIADIC_TEMPLATES)
+
+#define BOOST_VARIANT_AUX_DECLARE_PARAMS BOOST_VARIANT_ENUM_PARAMS(typename T)
+
+#else
 ///////////////////////////////////////////////////////////////////////////////
 // (detail) macro BOOST_VARIANT_AUX_DECLARE_PARAM
 //
@@ -196,6 +250,8 @@
         ) \
     /**/
 
+#endif // BOOST_NO_CXX11_VARIADIC_TEMPLATES
+
 ///////////////////////////////////////////////////////////////////////////////
 // class template variant (concept inspired by Andrei Alexandrescu)
 //

Modified: branches/release/boost/variant/visitor_ptr.hpp
==============================================================================
--- branches/release/boost/variant/visitor_ptr.hpp Tue Nov 12 04:58:22 2013 (r86649)
+++ branches/release/boost/variant/visitor_ptr.hpp 2013-11-12 05:16:15 EST (Tue, 12 Nov 2013) (r86650)
@@ -55,7 +55,7 @@
 
 public: // structors
 
- explicit visitor_ptr_t(visitor_t visitor)
+ explicit visitor_ptr_t(visitor_t visitor) BOOST_NOEXCEPT
       : visitor_(visitor)
     {
     }

Modified: branches/release/libs/variant/test/Jamfile.v2
==============================================================================
--- branches/release/libs/variant/test/Jamfile.v2 Tue Nov 12 04:58:22 2013 (r86649)
+++ branches/release/libs/variant/test/Jamfile.v2 2013-11-12 05:16:15 EST (Tue, 12 Nov 2013) (r86650)
@@ -16,6 +16,13 @@
     : requirements
         #<dependency>/boost/test//minimal
         <toolset>msvc:<asynch-exceptions>on
+ <toolset>gcc-4.8:<cxxflags>-DBOOST_VARIANT_USE_VARIADIC_TEMPLATES
+ <toolset>gcc-4.9:<cxxflags>-DBOOST_VARIANT_USE_VARIADIC_TEMPLATES
+ <toolset>clang-3.0:<cxxflags>-DBOOST_VARIANT_USE_VARIADIC_TEMPLATES
+ <toolset>clang-3.1:<cxxflags>-DBOOST_VARIANT_USE_VARIADIC_TEMPLATES
+ <toolset>clang-3.2:<cxxflags>-DBOOST_VARIANT_USE_VARIADIC_TEMPLATES
+ <toolset>clang-3.3:<cxxflags>-DBOOST_VARIANT_USE_VARIADIC_TEMPLATES
+ <toolset>clang-3.4:<cxxflags>-DBOOST_VARIANT_USE_VARIADIC_TEMPLATES
     ;
     
 test-suite variant
@@ -46,6 +53,7 @@
       <toolset>clang:<cxxflags>-fno-exceptions
       : variant_noexcept_test
     ]
+ [ run variant_swap_test.cpp ]
    ;
 
 

Modified: branches/release/libs/variant/test/rvalue_test.cpp
==============================================================================
--- branches/release/libs/variant/test/rvalue_test.cpp Tue Nov 12 04:58:22 2013 (r86649)
+++ branches/release/libs/variant/test/rvalue_test.cpp 2013-11-12 05:16:15 EST (Tue, 12 Nov 2013) (r86650)
@@ -92,6 +92,46 @@
 #else
 
 
+#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
+
+void run()
+{
+ // Making sure that internals of Boost.Move do not interfere with
+ // internals of Boost.Variant and in case of C++03 or C++98 compilation
+ // is still possible.
+ typedef boost::variant<int, move_copy_conting_class> variant_I_type;
+ variant_I_type v1, v2;
+ v1 = move_copy_conting_class();
+ v2 = v1;
+ v2 = boost::move(v1);
+ v1.swap(v2);
+
+ move_copy_conting_class val;
+ v2 = boost::move(val);
+ v2 = 10;
+
+ variant_I_type v3(boost::move(val));
+ variant_I_type v4(boost::move(v1));
+}
+
+void run1()
+{
+ BOOST_CHECK(true);
+}
+
+void run_move_only()
+{
+ BOOST_CHECK(true);
+}
+
+void run_moves_are_noexcept()
+{
+ BOOST_CHECK(true);
+}
+
+#else
+
+
 void run()
 {
     typedef boost::variant<int, move_copy_conting_class> variant_I_type;

Modified: branches/release/libs/variant/test/variant_reference_test.cpp
==============================================================================
--- branches/release/libs/variant/test/variant_reference_test.cpp Tue Nov 12 04:58:22 2013 (r86649)
+++ branches/release/libs/variant/test/variant_reference_test.cpp 2013-11-12 05:16:15 EST (Tue, 12 Nov 2013) (r86650)
@@ -77,8 +77,6 @@
 template <typename Base, typename Derived>
 void base_derived_test(Derived d)
 {
- typedef typename boost::is_pointer<Base>::type is_ptr;
-
     Base b(d);
     BOOST_CHECK((check_base_derived(
           b

Copied: branches/release/libs/variant/test/variant_swap_test.cpp (from r86648, trunk/libs/variant/test/variant_swap_test.cpp)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/release/libs/variant/test/variant_swap_test.cpp 2013-11-12 05:16:15 EST (Tue, 12 Nov 2013) (r86650, copy of r86648, trunk/libs/variant/test/variant_swap_test.cpp)
@@ -0,0 +1,90 @@
+//-----------------------------------------------------------------------------
+// boost-libs variant/test/variant_swap_test.cpp source file
+// See http://www.boost.org for updates, documentation, and revision history.
+//-----------------------------------------------------------------------------
+//
+// Copyright (c) 2009 ArtVPS Ltd.
+// Copyright (c) 2013 Antony Polukhin.
+//
+// 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)
+
+#include "boost/test/minimal.hpp"
+#include "boost/variant.hpp"
+
+#include <vector>
+#include <algorithm>
+
+void run1()
+{
+ using boost::variant;
+ typedef variant< int, std::vector<int>* > t_var;
+
+ std::vector<int> vec;
+ t_var v0(23), v1(&vec);
+
+ BOOST_REQUIRE(v0.which() == 0);
+ BOOST_REQUIRE(v1.which() == 1);
+
+ swap(v0, v1);
+
+ BOOST_CHECK(v0.which() == 1);
+ BOOST_CHECK(v1.which() == 0);
+}
+
+void run2()
+{
+ using boost::variant;
+ using std::swap;
+ typedef variant< std::vector<int>, std::vector<double> > t_var;
+
+ std::vector<int> vec1;
+ std::vector<double> vec2;
+ t_var v0(vec1), v1(vec2);
+
+ BOOST_REQUIRE(v0.which() == 0);
+ BOOST_REQUIRE(v1.which() == 1);
+
+ swap(v0, v1);
+
+ BOOST_CHECK(v0.which() == 1);
+ BOOST_CHECK(v1.which() == 0);
+
+ v0.swap(v1);
+
+ BOOST_CHECK(v0.which() == 0);
+ BOOST_CHECK(v1.which() == 1);
+}
+
+void run3()
+{
+ using boost::variant;
+ using std::swap;
+ typedef variant< int, double > t_var;
+
+ t_var v0(1), v1(2.0);
+
+ BOOST_REQUIRE(v0.which() == 0);
+ BOOST_REQUIRE(v1.which() == 1);
+
+ swap(v0, v1);
+
+ BOOST_CHECK(v0.which() == 1);
+ BOOST_CHECK(v1.which() == 0);
+
+ v0.swap(v1);
+
+ BOOST_CHECK(v0.which() == 0);
+ BOOST_CHECK(v1.which() == 1);
+}
+
+int test_main(int , char* [])
+{
+ run1();
+ run2();
+ run3();
+
+ return 0;
+}
+


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