File indexing completed on 2025-01-18 09:53:33
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef BOOST_VARIANT_RECURSIVE_WRAPPER_FWD_HPP
0016 #define BOOST_VARIANT_RECURSIVE_WRAPPER_FWD_HPP
0017
0018 #include <boost/mpl/bool.hpp>
0019 #include <boost/mpl/aux_/config/ctps.hpp>
0020 #include <boost/mpl/aux_/lambda_support.hpp>
0021 #include <boost/type_traits/integral_constant.hpp>
0022 #include <boost/type_traits/is_constructible.hpp>
0023 #include <boost/type_traits/is_nothrow_move_constructible.hpp>
0024
0025 namespace boost {
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043 template <typename T> class recursive_wrapper;
0044
0045
0046
0047
0048
0049
0050
0051 template <class T> struct is_constructible<recursive_wrapper<T>, T> : boost::true_type{};
0052 template <class T> struct is_constructible<recursive_wrapper<T>, const T> : boost::true_type{};
0053 template <class T> struct is_constructible<recursive_wrapper<T>, T&> : boost::true_type{};
0054 template <class T> struct is_constructible<recursive_wrapper<T>, const T&> : boost::true_type{};
0055 template <class T> struct is_constructible<recursive_wrapper<T>, recursive_wrapper<T> > : boost::true_type{};
0056 template <class T> struct is_constructible<recursive_wrapper<T>, const recursive_wrapper<T> > : boost::true_type{};
0057 template <class T> struct is_constructible<recursive_wrapper<T>, recursive_wrapper<T>& > : boost::true_type{};
0058 template <class T> struct is_constructible<recursive_wrapper<T>, const recursive_wrapper<T>& > : boost::true_type{};
0059
0060 template <class T, class U> struct is_constructible<recursive_wrapper<T>, U > : boost::false_type{};
0061 template <class T, class U> struct is_constructible<recursive_wrapper<T>, const U > : boost::false_type{};
0062 template <class T, class U> struct is_constructible<recursive_wrapper<T>, U& > : boost::false_type{};
0063 template <class T, class U> struct is_constructible<recursive_wrapper<T>, const U& > : boost::false_type{};
0064 template <class T, class U> struct is_constructible<recursive_wrapper<T>, recursive_wrapper<U> > : boost::false_type{};
0065 template <class T, class U> struct is_constructible<recursive_wrapper<T>, const recursive_wrapper<U> > : boost::false_type{};
0066 template <class T, class U> struct is_constructible<recursive_wrapper<T>, recursive_wrapper<U>& > : boost::false_type{};
0067 template <class T, class U> struct is_constructible<recursive_wrapper<T>, const recursive_wrapper<U>& > : boost::false_type{};
0068
0069
0070
0071 template <class T> struct is_nothrow_move_constructible<recursive_wrapper<T> > : boost::false_type{};
0072
0073
0074
0075
0076
0077
0078
0079 namespace detail {
0080
0081
0082 template <typename T>
0083 struct is_recursive_wrapper_impl
0084 : mpl::false_
0085 {
0086 };
0087
0088 template <typename T>
0089 struct is_recursive_wrapper_impl< recursive_wrapper<T> >
0090 : mpl::true_
0091 {
0092 };
0093
0094
0095 }
0096
0097 template< typename T > struct is_recursive_wrapper
0098 : public ::boost::integral_constant<bool,(::boost::detail::is_recursive_wrapper_impl<T>::value)>
0099 {
0100 public:
0101 BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_recursive_wrapper,(T))
0102 };
0103
0104
0105
0106
0107
0108
0109
0110
0111 template <typename T>
0112 struct unwrap_recursive
0113 {
0114 typedef T type;
0115
0116 BOOST_MPL_AUX_LAMBDA_SUPPORT(1,unwrap_recursive,(T))
0117 };
0118
0119 template <typename T>
0120 struct unwrap_recursive< recursive_wrapper<T> >
0121 {
0122 typedef T type;
0123
0124 BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,unwrap_recursive,(T))
0125 };
0126
0127
0128 }
0129
0130 #endif