mirror of
https://github.com/boostorg/move.git
synced 2025-07-31 04:47:14 +02:00
Ticket #6396: Implicit instanciation of boost::rv for non-cass types generates an error
[SVN r76508]
This commit is contained in:
@ -225,13 +225,32 @@
|
||||
|
||||
namespace boost {
|
||||
|
||||
namespace move_detail {
|
||||
template<class T>
|
||||
struct is_class_or_union
|
||||
{
|
||||
struct twochar { char _[2]; };
|
||||
template <class U>
|
||||
static char is_class_or_union_tester(void(U::*)(void));
|
||||
template <class U>
|
||||
static twochar is_class_or_union_tester(...);
|
||||
static const bool value = sizeof(is_class_or_union_tester<T>(0)) == sizeof(char);
|
||||
};
|
||||
struct empty{};
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// struct rv
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
template <class T>
|
||||
class rv : public T
|
||||
class rv
|
||||
: public BOOST_MOVE_MPL_NS::if_c
|
||||
< ::boost::move_detail::is_class_or_union<T>::value
|
||||
, T
|
||||
, ::boost::move_detail::empty
|
||||
>::type
|
||||
{
|
||||
rv();
|
||||
~rv();
|
||||
@ -239,6 +258,8 @@
|
||||
void operator=(rv const&);
|
||||
} BOOST_MOVE_ATTRIBUTE_MAY_ALIAS;
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// move_detail::is_rv
|
||||
|
Reference in New Issue
Block a user