mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-02 21:11:25 +12:00
simplify template code like std::invoke_result<T>::type
This commit is contained in:
parent
9e9a3262eb
commit
862727e9bf
6 changed files with 6 additions and 5 deletions
|
@ -13,7 +13,7 @@ struct bf_base
|
|||
{
|
||||
using type = T;
|
||||
using vtype = std::common_type_t<type>;
|
||||
using utype = typename std::make_unsigned<vtype>::type;
|
||||
using utype = std::make_unsigned_t<vtype>;
|
||||
|
||||
static constexpr bool can_be_packed = N < (sizeof(int) * 8 + (std::is_unsigned_v<vtype> ? 1 : 0)) && sizeof(vtype) > sizeof(int);
|
||||
using compact_type = std::conditional_t<can_be_packed, std::conditional_t<std::is_unsigned_v<vtype>, uint, int>, vtype>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue