mirror of
https://github.com/boostorg/move.git
synced 2025-08-01 05:14:27 +02:00
Fixed error with convertible types in move helpers
[SVN r74260]
This commit is contained in:
@@ -121,7 +121,7 @@
|
|||||||
class false_t { char dummy[2]; };
|
class false_t { char dummy[2]; };
|
||||||
static true_t dispatch(U);
|
static true_t dispatch(U);
|
||||||
static false_t dispatch(...);
|
static false_t dispatch(...);
|
||||||
static T trigger();
|
static T &trigger();
|
||||||
public:
|
public:
|
||||||
enum { value = sizeof(dispatch(trigger())) == sizeof(true_t) };
|
enum { value = sizeof(dispatch(trigger())) == sizeof(true_t) };
|
||||||
};
|
};
|
||||||
@@ -718,13 +718,13 @@ namespace move_detail {
|
|||||||
|
|
||||||
template <class I>
|
template <class I>
|
||||||
struct is_move_iterator
|
struct is_move_iterator
|
||||||
: public BOOST_MOVE_MPL_NS::integral_constant<bool, false>
|
: public BOOST_MOVE_BOOST_NS::integral_constant<bool, false>
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class I>
|
template <class I>
|
||||||
struct is_move_iterator< ::boost::move_iterator<I> >
|
struct is_move_iterator< ::boost::move_iterator<I> >
|
||||||
: public BOOST_MOVE_MPL_NS::integral_constant<bool, true>
|
: public BOOST_MOVE_BOOST_NS::integral_constant<bool, true>
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -27,9 +27,9 @@
|
|||||||
#if defined(BOOST_NO_RVALUE_REFERENCES)
|
#if defined(BOOST_NO_RVALUE_REFERENCES)
|
||||||
struct not_a_type;
|
struct not_a_type;
|
||||||
#define BOOST_MOVE_CATCH_CONST(U) \
|
#define BOOST_MOVE_CATCH_CONST(U) \
|
||||||
typename ::boost::mpl::if_< ::boost::is_class<T>, BOOST_CATCH_CONST_RLVALUE(U), const U &>::type
|
typename ::boost::mpl::if_< ::boost::is_class<U>, BOOST_CATCH_CONST_RLVALUE(U), const U &>::type
|
||||||
#define BOOST_MOVE_CATCH_RVALUE(U)\
|
#define BOOST_MOVE_CATCH_RVALUE(U)\
|
||||||
typename ::boost::mpl::if_< ::boost::is_class<T>, BOOST_RV_REF(T), not_a_type>::type
|
typename ::boost::mpl::if_< ::boost::is_class<U>, BOOST_RV_REF(U), not_a_type>::type
|
||||||
#define BOOST_MOVE_CATCH_FWD(U) BOOST_FWD_REF(U)
|
#define BOOST_MOVE_CATCH_FWD(U) BOOST_FWD_REF(U)
|
||||||
#else
|
#else
|
||||||
#define BOOST_MOVE_CATCH_CONST(U) const U &
|
#define BOOST_MOVE_CATCH_CONST(U) const U &
|
||||||
@@ -60,9 +60,9 @@ struct not_a_type;
|
|||||||
\
|
\
|
||||||
template<class BOOST_MOVE_TEMPL_PARAM>\
|
template<class BOOST_MOVE_TEMPL_PARAM>\
|
||||||
typename ::boost::enable_if_c\
|
typename ::boost::enable_if_c\
|
||||||
< ::boost::is_class<BOOST_MOVE_TEMPL_PARAM>::value &&\
|
< (!::boost::is_class<BOOST_MOVE_TEMPL_PARAM>::value || \
|
||||||
!::boost::is_same<TYPE, BOOST_MOVE_TEMPL_PARAM>::value &&\
|
!::boost::move_detail::is_rv<BOOST_MOVE_TEMPL_PARAM>::value) && \
|
||||||
!::boost::move_detail::is_rv<BOOST_MOVE_TEMPL_PARAM>::value\
|
!::boost::is_same<TYPE, BOOST_MOVE_TEMPL_PARAM>::value \
|
||||||
, RETURN_VALUE >::type\
|
, RETURN_VALUE >::type\
|
||||||
PUB_FUNCTION(const BOOST_MOVE_TEMPL_PARAM &u)\
|
PUB_FUNCTION(const BOOST_MOVE_TEMPL_PARAM &u)\
|
||||||
{\
|
{\
|
||||||
@@ -127,9 +127,9 @@ struct not_a_type;
|
|||||||
\
|
\
|
||||||
template<class BOOST_MOVE_TEMPL_PARAM>\
|
template<class BOOST_MOVE_TEMPL_PARAM>\
|
||||||
typename ::boost::enable_if_c\
|
typename ::boost::enable_if_c\
|
||||||
< ::boost::is_class<BOOST_MOVE_TEMPL_PARAM>::value &&\
|
< (!::boost::is_class<BOOST_MOVE_TEMPL_PARAM>::value || \
|
||||||
!::boost::is_same<TYPE, BOOST_MOVE_TEMPL_PARAM>::value &&\
|
!::boost::move_detail::is_rv<BOOST_MOVE_TEMPL_PARAM>::value) && \
|
||||||
!::boost::move_detail::is_rv<BOOST_MOVE_TEMPL_PARAM>::value\
|
!::boost::is_same<TYPE, BOOST_MOVE_TEMPL_PARAM>::value \
|
||||||
, RETURN_VALUE >::type\
|
, RETURN_VALUE >::type\
|
||||||
PUB_FUNCTION(ARG1 arg1, const BOOST_MOVE_TEMPL_PARAM &u)\
|
PUB_FUNCTION(ARG1 arg1, const BOOST_MOVE_TEMPL_PARAM &u)\
|
||||||
{\
|
{\
|
||||||
|
Reference in New Issue
Block a user