14 #ifndef BOOST_MOVE_DETAIL_META_UTILS_HPP
15 #define BOOST_MOVE_DETAIL_META_UTILS_HPP
17 #if defined(BOOST_HAS_PRAGMA_ONCE)
30 template <
class T>
class rv;
32 namespace move_detail {
37 template<
class T,
class U>
46 template<
class F,
class Param>
59 operator bool()
const {
return C_; }
101 #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
124 struct remove_reference< const rv<
T> &>
165 #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
209 static const bool value =
true;
236 static const bool value =
sizeof(is_class_or_union_tester<T>(0)) ==
sizeof(
char);
258 return reinterpret_cast<T*
>(
259 &
const_cast<char&
>(
reinterpret_cast<const volatile char &
>(v)));
269 return ::boost::move_detail::addressof_impl<T>::f
280 template <
class U>
static two test(...);
281 template <
class U>
static char test(
typename U::pointer* = 0);
282 static const bool value =
sizeof(test<T>(0)) == 1;
288 #if defined(_MSC_VER) && (_MSC_VER >= 1400)
292 template <
class T,
class U>
295 static const bool value = __is_convertible_to(
T, U);
300 template <
class T,
class U>
315 template <class T, class U, bool IsSame = is_same<T, U>::value>
320 template <
class T,
class U>
345 #if defined(BOOST_GCC) && (BOOST_GCC <= 40000)
346 #define BOOST_MOVE_HELPERS_RETURN_SFINAE_BROKEN
349 template<
class T,
class U,
class R =
void>
354 template<
class T,
class U,
class R =
void>
359 template<
class T,
class U,
class R =
void>
361 :
enable_if< is_same_or_convertible<T, U>, R>
364 template<
class T,
class U,
class R =
void>
366 :
disable_if< is_same_or_convertible<T, U>, R>
374 template<
bool,
class B = true_,
class C = true_,
class D = true_>
382 static const bool value =
true;
385 template<
class B,
class C,
class D>
388 static const bool value =
false;
391 template<
class A,
class B,
class C = true_,
class D = true_>
401 template<
bool,
class B = false_,
class C = false_,
class D = false_>
409 static const bool value =
false;
412 template<
class B,
class C,
class D>
415 static const bool value =
true;
418 template<
class A,
class B,
class C = false_,
class D = false_>
431 static const bool value = !T::value;
440 template<
class R,
class A,
class B,
class C = true_,
class D = true_>
445 template<
class R,
class A,
class B,
class C = true_,
class D = true_>
450 template<
class R,
class A,
class B,
class C = false_,
class D = false_>
455 template<
class R,
class A,
class B,
class C = false_,
class D = false_>
472 {
static const bool value =
false; };
476 {
static const bool value =
false; };
486 {
static const bool value =
false; };
490 {
static const bool value =
true; };
494 {
static const bool value =
true; };
500 {
static const bool value =
false; };
502 #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
506 {
static const bool value =
true; };
508 #else // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
512 {
static const bool value =
true; };
516 {
static const bool value =
true; };
518 #endif // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
520 #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
526 #else // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
528 namespace detail_add_rvalue_reference
533 struct add_rvalue_reference_impl {
typedef T type; };
535 template<
class T,
bool emulation>
536 struct add_rvalue_reference_impl<
T, emulation, true > {
typedef T &
type; };
538 template<
class T,
bool rv >
539 struct add_rvalue_reference_impl<
T, true, rv > { typedef ::boost::rv<T>& type; };
543 struct add_rvalue_reference
544 : detail_add_rvalue_reference::add_rvalue_reference_impl<T>
548 struct add_rvalue_reference<
T &>
549 {
typedef T & type; };
551 #endif // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
555 #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
557 #else // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
559 template<
class T >
struct remove_rvalue_reference< const
rv<
T> > {
typedef T type; };
560 template<
class T >
struct remove_rvalue_reference< volatile rv<
T> > {
typedef T type; };
561 template<
class T >
struct remove_rvalue_reference< const volatile rv<
T> > {
typedef T type; };
562 template<
class T >
struct remove_rvalue_reference< rv<
T>& > {
typedef T type; };
563 template<
class T >
struct remove_rvalue_reference< const rv<
T>& > {
typedef T type; };
564 template<
class T >
struct remove_rvalue_reference< volatile rv<
T>& > {
typedef T type; };
565 template<
class T >
struct remove_rvalue_reference< const volatile rv<
T>& >{
typedef T type; };
566 #endif // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
585 #endif //#ifndef BOOST_MOVE_DETAIL_META_UTILS_HPP