forked from boostorg/type_traits
Add _t aliases
This commit is contained in:
1 parent
551502a4a0
commit
f51a528591
43 files changed
+183
-18
No files matched your search
@@ -41,6 +41,12 @@ namespace boost {
|
||||
typedef T& type;
|
||||
};
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
|
||||
|
||||
template <class T> using add_const_t = typename add_const<T>::type;
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_TT_ADD_CONST_HPP_INCLUDED
|
||||
@@ -36,6 +36,12 @@ template <class T> struct add_cv{ typedef T const volatile type; };
|
||||
|
||||
template <class T> struct add_cv<T&>{ typedef T& type; };
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
|
||||
|
||||
template <class T> using add_cv_t = typename add_cv<T>::type;
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_TT_ADD_CV_HPP_INCLUDED
|
||||
@@ -22,6 +22,12 @@ template <class T> struct add_lvalue_reference<T&&>
|
||||
};
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
|
||||
|
||||
template <class T> using add_lvalue_reference_t = typename add_lvalue_reference<T>::type;
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif // BOOST_TYPE_TRAITS_EXT_ADD_LVALUE_REFERENCE__HPP
|
||||
@@ -56,6 +56,12 @@ struct add_pointer
|
||||
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
|
||||
|
||||
template <class T> using add_pointer_t = typename add_pointer<T>::type;
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_TT_ADD_POINTER_HPP_INCLUDED
|
||||
@@ -58,6 +58,12 @@ template <class T> struct add_rvalue_reference
|
||||
typedef typename boost::type_traits_detail::add_rvalue_reference_imp<T>::type type;
|
||||
};
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
|
||||
|
||||
template <class T> using add_rvalue_reference_t = typename add_rvalue_reference<T>::type;
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_TYPE_TRAITS_EXT_ADD_RVALUE_REFERENCE__HPP
|
||||
|
||||
@@ -35,6 +35,12 @@ template <class T> struct add_volatile{ typedef T volatile type; };
|
||||
|
||||
template <class T> struct add_volatile<T&>{ typedef T& type; };
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
|
||||
|
||||
template <class T> using add_volatile_t = typename add_volatile<T>::type;
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_TT_ADD_VOLATILE_HPP_INCLUDED
|
||||
@@ -14,6 +14,12 @@ namespace boost {
|
||||
template <bool b, class T, class U> struct conditional { typedef T type; };
|
||||
template <class T, class U> struct conditional<false, T, U> { typedef U type; };
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
|
||||
|
||||
template <bool b, class T, class U> using conditional_t = typename conditional<b, T, U>::type;
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
|
||||
|
||||
@@ -29,6 +29,12 @@ public:
|
||||
typedef typename boost::conditional<boost::is_volatile<U>::value, typename boost::add_volatile<CT>::type, CT>::type type;
|
||||
};
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
|
||||
|
||||
template <class T, class U> using copy_cv_t = typename copy_cv<T, U>::type;
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // #ifndef BOOST_TYPE_TRAITS_COPY_CV_HPP_INCLUDED
|
||||
@@ -37,6 +37,12 @@ namespace boost
|
||||
typedef typename boost::detail::decay_imp<Ty, boost::is_array<Ty>::value, boost::is_function<Ty>::value>::type type;
|
||||
};
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
|
||||
|
||||
template <class T> using decay_t = typename decay<T>::type;
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
|
||||
|
||||
@@ -14,6 +14,12 @@ namespace boost {
|
||||
template<> struct floating_point_promotion<float volatile>{ typedef double volatile type; };
|
||||
template<> struct floating_point_promotion<float const volatile> { typedef double const volatile type; };
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
|
||||
|
||||
template <class T> using floating_point_promotion_t = typename floating_point_promotion<T>::type;
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif // #ifndef FILE_boost_type_traits_floating_point_promotion_hpp_INCLUDED
|
||||
|
||||
@@ -175,6 +175,12 @@ public:
|
||||
typedef typename boost::type_traits::detail::integral_promotion<T, tag_type::value>::type type;
|
||||
};
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
|
||||
|
||||
template <class T> using integral_promotion_t = typename integral_promotion<T>::type;
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif // #ifndef FILE_boost_type_traits_integral_promotion_hpp_INCLUDED
|
||||
|
||||
@@ -125,6 +125,12 @@ public:
|
||||
>::type type;
|
||||
};
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
|
||||
|
||||
template <class T> using make_signed_t = typename make_signed<T>::type;
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_TT_ADD_REFERENCE_HPP_INCLUDED
|
||||
|
||||
@@ -124,6 +124,12 @@ public:
|
||||
>::type type;
|
||||
};
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
|
||||
|
||||
template <class T> using make_unsigned_t = typename make_unsigned<T>::type;
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_TT_ADD_REFERENCE_HPP_INCLUDED
|
||||
|
||||
@@ -14,6 +14,12 @@ namespace boost {
|
||||
|
||||
template<class T> struct promote : public integral_promotion<typename floating_point_promotion<T>::type>{};
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
|
||||
|
||||
template <class T> using promote_t = typename promote<T>::type;
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif // #ifndef FILE_boost_type_traits_promote_hpp_INCLUDED
|
||||
|
||||
@@ -30,6 +30,12 @@ template <class T> struct remove_all_extents<T const volatile[]> : public remove
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
|
||||
|
||||
template <class T> using remove_all_extents_t = typename remove_all_extents<T>::type;
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_TT_REMOVE_BOUNDS_HPP_INCLUDED
|
||||
@@ -28,6 +28,12 @@ namespace boost {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
|
||||
|
||||
template <class T> using remove_const_t = typename remove_const<T>::type;
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_TT_REMOVE_CONST_HPP_INCLUDED
|
||||
@@ -34,6 +34,11 @@ template <class T> struct remove_cv<T volatile[]>{ typedef T type[]; };
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
|
||||
|
||||
template <class T> using remove_cv_t = typename remove_cv<T>::type;
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
|
||||
@@ -30,6 +30,12 @@ template <typename T> struct remove_extent<T const volatile[]> { typedef T const
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
|
||||
|
||||
template <class T> using remove_extent_t = typename remove_extent<T>::type;
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_TT_REMOVE_BOUNDS_HPP_INCLUDED
|
||||
@@ -72,6 +72,12 @@ template <class T> struct remove_pointer<T*const volatile>{ typedef T type; };
|
||||
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
|
||||
|
||||
template <class T> using remove_pointer_t = typename remove_pointer<T>::type;
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_TT_REMOVE_POINTER_HPP_INCLUDED
|
||||
@@ -48,6 +48,11 @@ template <class T> struct remove_reference<T&volatile>{ typedef T type; };
|
||||
template <class T> struct remove_reference<T&const volatile>{ typedef T type; };
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
|
||||
|
||||
template <class T> using remove_reference_t = typename remove_reference<T>::type;
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
|
||||
@@ -28,6 +28,11 @@ namespace boost {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
|
||||
|
||||
template <class T> using remove_volatile_t = typename remove_volatile<T>::type;
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
|
||||
Reference in new issue
Block a user