forked from boostorg/move
Move "forward_type" to core.hpp
This commit is contained in:
@@ -254,6 +254,19 @@
|
||||
private:\
|
||||
//
|
||||
|
||||
namespace boost{
|
||||
namespace move_detail{
|
||||
|
||||
template< class T>
|
||||
struct forward_type
|
||||
{ typedef const T &type; };
|
||||
|
||||
template< class T>
|
||||
struct forward_type< boost::rv<T> >
|
||||
{ typedef T type; };
|
||||
|
||||
}}
|
||||
|
||||
#else //BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
//Compiler workaround detection
|
||||
@@ -437,6 +450,13 @@
|
||||
|
||||
#endif //!defined(BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG) || defined(BOOST_MOVE_DOXYGEN_INVOKED)
|
||||
|
||||
namespace boost {
|
||||
namespace move_detail {
|
||||
|
||||
template< class T> struct forward_type { typedef T type; };
|
||||
|
||||
}}
|
||||
|
||||
#endif //BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
#include <boost/move/detail/config_end.hpp>
|
||||
|
@@ -70,18 +70,6 @@ struct is_nothrow_move_constructible_or_uncopyable
|
||||
|
||||
// Code from Jeffrey Lee Hellrung, many thanks
|
||||
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
template< class T> struct forward_type { typedef T type; };
|
||||
#else // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
template< class T>
|
||||
struct forward_type
|
||||
{ typedef const T &type; };
|
||||
|
||||
template< class T>
|
||||
struct forward_type< boost::rv<T> >
|
||||
{ typedef T type; };
|
||||
#endif // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
template< class T > struct is_rvalue_reference : ::boost::move_detail::integral_constant<bool, false> { };
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
template< class T > struct is_rvalue_reference< T&& > : ::boost::move_detail::integral_constant<bool, true> { };
|
||||
|
Reference in New Issue
Block a user