mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 00:41:26 +12:00
simplify template code like std::is_same<T>::value
This commit is contained in:
parent
c268189e38
commit
9e9a3262eb
26 changed files with 111 additions and 107 deletions
|
@ -16,7 +16,7 @@ struct to_se
|
|||
};
|
||||
|
||||
template <typename T2>
|
||||
struct to_se_<T2, std::enable_if_t<std::is_arithmetic<T2>::value || std::is_enum<T2>::value>>
|
||||
struct to_se_<T2, std::enable_if_t<std::is_arithmetic_v<T2> || std::is_enum_v<T2>>>
|
||||
{
|
||||
using type = std::conditional_t<(sizeof(T2) > 1), se_t<T2, Se>, T2>;
|
||||
};
|
||||
|
@ -44,14 +44,14 @@ struct to_se<s128, Se>
|
|||
};
|
||||
|
||||
template <typename T, bool Se>
|
||||
struct to_se<const T, Se, std::enable_if_t<!std::is_array<T>::value>>
|
||||
struct to_se<const T, Se, std::enable_if_t<!std::is_array_v<T>>>
|
||||
{
|
||||
// Move const qualifier
|
||||
using type = const typename to_se<T, Se>::type;
|
||||
};
|
||||
|
||||
template <typename T, bool Se>
|
||||
struct to_se<volatile T, Se, std::enable_if_t<!std::is_array<T>::value && !std::is_const<T>::value>>
|
||||
struct to_se<volatile T, Se, std::enable_if_t<!std::is_array_v<T> && !std::is_const_v<T>>>
|
||||
{
|
||||
// Move volatile qualifier
|
||||
using type = volatile typename to_se<T, Se>::type;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue