From fd7aaebd3f20c65662931a5d0f90f5a0a143afe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Thu, 24 May 2012 17:02:29 +0000 Subject: [PATCH] Merge move from trunk [SVN r78592] --- include/boost/move/move.hpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/include/boost/move/move.hpp b/include/boost/move/move.hpp index e43623d..172ef30 100644 --- a/include/boost/move/move.hpp +++ b/include/boost/move/move.hpp @@ -217,9 +217,9 @@ #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) //Move emulation rv breaks standard aliasing rules so add workarounds for some compilers - #ifdef __GNUC__ - #define BOOST_MOVE_ATTRIBUTE_MAY_ALIAS __attribute__((__may_alias__)) - #else + #ifdef __GNUC__ + #define BOOST_MOVE_ATTRIBUTE_MAY_ALIAS __attribute__((__may_alias__)) + #else #define BOOST_MOVE_ATTRIBUTE_MAY_ALIAS #endif @@ -306,10 +306,10 @@ {}; template - struct has_move_emulation_enabled_aux + struct has_move_emulation_enabled_aux : has_move_emulation_enabled {}; - - template + + template struct has_nothrow_move : public BOOST_MOVE_BOOST_NS::integral_constant {}; @@ -319,7 +319,7 @@ // move() // ////////////////////////////////////////////////////////////////////////////// - + template inline typename BOOST_MOVE_BOOST_NS::disable_if, T&>::type move(T& x) { @@ -460,7 +460,7 @@ //! By default this traits returns false. Classes with non-throwing move constructor //! and assignment should specialize this trait to obtain some performance improvements. - template + template struct has_nothrow_move : public BOOST_MOVE_MPL_NS::integral_constant {}; @@ -494,7 +494,7 @@ //! This function provides a way to convert a reference into a rvalue reference //! in compilers with rvalue references. For other compilers converts T & into //! ::boost::rv & so that move emulation is activated. - template + template rvalue_reference move (input_reference); #elif defined(BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES) @@ -508,7 +508,7 @@ template inline typename remove_reference::type && move(T&& t) - { return static_cast::type &&>(t); } + { return static_cast::type &&>(t); } #endif //Old move @@ -1222,7 +1222,7 @@ template< class T > struct remove_rvalue_reference { typedef T type; }; template< class T > struct remove_rvalue_reference< const rv& > { typedef T type; }; template< class T > struct remove_rvalue_reference< volatile rv& > { typedef T type; }; template< class T > struct remove_rvalue_reference< const volatile rv& >{ typedef T type; }; -#endif // #ifndef BOOST_NO_RVALUE_REFERENCES +#endif // #ifndef BOOST_NO_RVALUE_REFERENCES template typename boost::move_detail::add_rvalue_reference::type declval(); @@ -1230,7 +1230,7 @@ typename boost::move_detail::add_rvalue_reference::type declval(); } // Ideas from Boost.Move review, Jeffrey Lee Hellrung: // -//- TypeTraits metafunctions is_lvalue_reference, add_lvalue_reference, and remove_lvalue_reference ? +//- TypeTraits metafunctions is_lvalue_reference, add_lvalue_reference, and remove_lvalue_reference ? // Perhaps add_reference and remove_reference can be modified so that they behave wrt emulated rvalue // references the same as wrt real rvalue references, i.e., add_reference< rv& > -> T& rather than // rv& (since T&& & -> T&). @@ -1238,7 +1238,7 @@ typename boost::move_detail::add_rvalue_reference::type declval(); //- Add'l TypeTraits has_[trivial_]move_{constructor,assign}...? // //- An as_lvalue(T& x) function, which amounts to an identity operation in C++0x, but strips emulated -// rvalue references in C++03. This may be necessary to prevent "accidental moves". +// rvalue references in C++03. This may be necessary to prevent "accidental moves". } //namespace boost {