File indexing completed on 2026-07-26 08:51:18
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef BOOST_MOVE_DETAIL_META_UTILS_CORE_HPP
0015 #define BOOST_MOVE_DETAIL_META_UTILS_CORE_HPP
0016
0017 #ifndef BOOST_CONFIG_HPP
0018 # include <boost/config.hpp>
0019 #endif
0020 0021 ">#
0022 #if defined(BOOST_HAS_PRAGMA_ONCE)
0023 # pragma once
0024 #endif
0025
0026
0027
0028 namespace boost {
0029 namespace move_detail {
0030
0031 template<typename T>
0032 struct voider { typedef void type; };
0033
0034
0035
0036
0037 template<bool C, typename T1, typename T2>
0038 struct if_c
0039 {
0040 typedef T1 type;
0041 };
0042
0043 template<typename T1, typename T2>
0044 struct if_c<false,T1,T2>
0045 {
0046 typedef T2 type;
0047 };
0048
0049
0050
0051
0052 template<typename T1, typename T2, typename T3>
0053 struct if_ : if_c<0 != T1::value, T2, T3>
0054 {};
0055
0056
0057
0058
0059 struct enable_if_nat{};
0060
0061 template <bool B, class T = enable_if_nat>
0062 struct enable_if_c
0063 {
0064 typedef T type;
0065 };
0066
0067 template <class T>
0068 struct enable_if_c<false, T> {};
0069
0070
0071
0072
0073 template <class Cond, class T = enable_if_nat>
0074 struct enable_if : enable_if_c<Cond::value, T> {};
0075
0076
0077
0078
0079 template <bool B, class T = enable_if_nat>
0080 struct disable_if_c
0081 : enable_if_c<!B, T>
0082 {};
0083
0084
0085
0086
0087 template <class Cond, class T = enable_if_nat>
0088 struct disable_if : enable_if_c<!Cond::value, T> {};
0089
0090
0091
0092
0093 template<class T, T v>
0094 struct integral_constant
0095 {
0096 static const T value = v;
0097 typedef T value_type;
0098 typedef integral_constant<T, v> type;
0099
0100 operator T() const { return value; }
0101 T operator()() const { return value; }
0102 };
0103
0104 typedef integral_constant<bool, true > true_type;
0105 typedef integral_constant<bool, false > false_type;
0106
0107
0108
0109
0110
0111 template<class T, class U>
0112 struct is_same
0113 {
0114 static const bool value = false;
0115 };
0116
0117 template<class T>
0118 struct is_same<T, T>
0119 {
0120 static const bool value = true;
0121 };
0122
0123
0124
0125
0126 template <class T, class U, class R = enable_if_nat>
0127 struct enable_if_same : enable_if<is_same<T, U>, R> {};
0128
0129
0130
0131
0132 template <class T, class U, class R = enable_if_nat>
0133 struct disable_if_same : disable_if<is_same<T, U>, R> {};
0134
0135
0136
0137
0138 template<class T>
0139 struct is_lvalue_reference
0140 {
0141 static const bool value = false;
0142 };
0143
0144 template<class T>
0145 struct is_lvalue_reference<T&>
0146 {
0147 static const bool value = true;
0148 };
0149
0150 }
0151 }
0152
0153 #endif