|
@@ -54,71 +54,34 @@ namespace utl { |
|
|
using void_t = typename void_t_impl<_Ts...>::type;
|
|
|
using void_t = typename void_t_impl<_Ts...>::type;
|
|
|
//! @}
|
|
|
//! @}
|
|
|
|
|
|
|
|
|
|
|
|
//! Alias template for if_
|
|
|
|
|
|
template<bool _C, typename _Tp = void>
|
|
|
|
|
|
using if_t = typename if_<_C, _Tp>::type;
|
|
|
|
|
|
|
|
|
|
|
|
//! Publicly recognized alias template for if_
|
|
|
|
|
|
template<bool _C, typename _Tp = void>
|
|
|
|
|
|
using enable_if_t = typename if_<_C, _Tp>::type;
|
|
|
|
|
|
|
|
|
|
|
|
//! Uniform alias template for if_
|
|
|
|
|
|
template<bool _C, typename _Tp = void>
|
|
|
|
|
|
using use_if_t = typename if_<_C, _Tp>::type;
|
|
|
|
|
|
|
|
|
//! If same type resolves to _Ret, else SFINAE
|
|
|
//! If same type resolves to _Ret, else SFINAE
|
|
|
//! @{
|
|
|
|
|
|
template <typename _T1, typename _T2, typename _Ret =_T1>
|
|
|
template <typename _T1, typename _T2, typename _Ret =_T1>
|
|
|
struct use_if_same_ {
|
|
|
|
|
|
using type = if_t <
|
|
|
|
|
|
same_<_T1, _T2>::value,
|
|
|
|
|
|
_Ret
|
|
|
|
|
|
>;
|
|
|
|
|
|
};
|
|
|
|
|
|
template <typename _T1, typename _T2, typename _Ret =_T1>
|
|
|
|
|
|
using use_if_same_t = typename use_if_same_<_T1, _T2, _Ret>::type;
|
|
|
|
|
|
//! @}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
using use_if_same_t = typename if_<same_<_T1, _T2>::value, _Ret>::type;
|
|
|
|
|
|
|
|
|
//! If not same type resolves to _Ret, else SFINAE
|
|
|
//! If not same type resolves to _Ret, else SFINAE
|
|
|
//! @{
|
|
|
|
|
|
template <typename _T1, typename _T2, typename _Ret =_T1>
|
|
|
|
|
|
struct use_if_not_same_ {
|
|
|
|
|
|
using type = if_t <
|
|
|
|
|
|
!same_<_T1, _T2>::value,
|
|
|
|
|
|
_Ret
|
|
|
|
|
|
>;
|
|
|
|
|
|
};
|
|
|
|
|
|
template <typename _T1, typename _T2, typename _Ret =_T1>
|
|
|
template <typename _T1, typename _T2, typename _Ret =_T1>
|
|
|
using use_if_not_same_t = typename use_if_not_same_<_T1, _T2, _Ret>::type;
|
|
|
|
|
|
//! @}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
using use_if_not_same_t = typename if_<!same_<_T1, _T2>::value, _Ret>::type;
|
|
|
|
|
|
|
|
|
//! If any type (_T1 or _T2) type resolves to _Ret, else to SFINAE
|
|
|
//! If any type (_T1 or _T2) type resolves to _Ret, else to SFINAE
|
|
|
//! @{
|
|
|
|
|
|
template <typename _T1, typename _T2, typename _Ret =_T1>
|
|
|
|
|
|
struct use_if_any_ {
|
|
|
|
|
|
using type = if_t <
|
|
|
|
|
|
or_<_T1, _T2>::value,
|
|
|
|
|
|
_Ret
|
|
|
|
|
|
>;
|
|
|
|
|
|
};
|
|
|
|
|
|
template <typename _T1, typename _T2, typename _Ret =_T1>
|
|
|
template <typename _T1, typename _T2, typename _Ret =_T1>
|
|
|
using use_if_any_t = typename use_if_any_<_T1, _T2, _Ret>::type;
|
|
|
|
|
|
//! @}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
using use_if_any_t = typename if_<or_<_T1, _T2>::value, _Ret>::type;
|
|
|
|
|
|
|
|
|
//! If both type (_T1 and _T2) type resolves to _Ret, else to SFINAE
|
|
|
//! If both type (_T1 and _T2) type resolves to _Ret, else to SFINAE
|
|
|
//! @{
|
|
|
|
|
|
template <typename _T1, typename _T2, typename _Ret =_T1>
|
|
|
template <typename _T1, typename _T2, typename _Ret =_T1>
|
|
|
struct use_if_both_ {
|
|
|
|
|
|
using type = if_t <
|
|
|
|
|
|
and_<_T1, _T2>::value,
|
|
|
|
|
|
_Ret
|
|
|
|
|
|
>;
|
|
|
|
|
|
};
|
|
|
|
|
|
template <typename _T1, typename _T2, typename _Ret =_T1>
|
|
|
|
|
|
using use_if_both_t = typename use_if_both_<_T1, _T2, _Ret>::type;
|
|
|
|
|
|
//! @}
|
|
|
|
|
|
|
|
|
using use_if_both_t = typename if_<and_<_T1, _T2>::value, _Ret>::type;
|
|
|
|
|
|
|
|
|
//! Publicly recognized alias template for if_t
|
|
|
|
|
|
template<bool _C, typename _Tp = void>
|
|
|
|
|
|
using enable_if_t = typename if_<_C, _Tp>::type;
|
|
|
|
|
|
|
|
|
|
|
|
//! Uniform use_ style alias template for if_t
|
|
|
|
|
|
//!@{
|
|
|
|
|
|
template<bool _C, typename _Tp = void>
|
|
|
|
|
|
using use_if_t = typename if_<_C, _Tp>::type;
|
|
|
|
|
|
//!@{
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
//! @}
|
|
|
//! @}
|
|
|