mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 21:41:26 +12:00
Remove explicit_bool_t, ignore, multicast<>
Remove vm::ptr operator % This was a bad idea but explicit_bool_t was created almost for it Other removed types are unused and have little to no meaning
This commit is contained in:
parent
99ffc3fca9
commit
ee96807305
11 changed files with 22 additions and 91 deletions
|
@ -112,10 +112,6 @@ class se_t;
|
|||
template <typename T>
|
||||
class atomic_t;
|
||||
|
||||
#if defined(__INTELLISENSE__) && !defined(_MSC_VER)
|
||||
namespace std { template <typename...> using void_t = void; }
|
||||
#endif
|
||||
|
||||
// Extract T::simple_type if available, remove cv qualifiers
|
||||
template <typename T, typename = void>
|
||||
struct simple_type_helper
|
||||
|
@ -151,22 +147,6 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
// Bool wrapper for restricting bool result conversions
|
||||
struct explicit_bool_t
|
||||
{
|
||||
const bool value;
|
||||
|
||||
constexpr explicit_bool_t(bool value)
|
||||
: value(value)
|
||||
{
|
||||
}
|
||||
|
||||
explicit constexpr operator bool() const
|
||||
{
|
||||
return value;
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef _MSC_VER
|
||||
using u128 = __uint128_t;
|
||||
using s128 = __int128_t;
|
||||
|
@ -382,14 +362,6 @@ CHECK_SIZE_ALIGN(f16, 2, 2);
|
|||
using f32 = float;
|
||||
using f64 = double;
|
||||
|
||||
struct ignore
|
||||
{
|
||||
template <typename T>
|
||||
ignore(T)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T, typename = std::enable_if_t<std::is_integral<T>::value>>
|
||||
constexpr T align(const T& value, ullong align)
|
||||
{
|
||||
|
@ -811,35 +783,6 @@ struct cmd64 : any64
|
|||
|
||||
static_assert(sizeof(cmd64) == 8 && std::is_pod<cmd64>::value, "Incorrect cmd64 type");
|
||||
|
||||
// Allows to define integer convertible to multiple types
|
||||
template <typename T, T Value, typename T1 = void, typename... Ts>
|
||||
struct multicast : multicast<T, Value, Ts...>
|
||||
{
|
||||
constexpr multicast()
|
||||
: multicast<T, Value, Ts...>()
|
||||
{
|
||||
}
|
||||
|
||||
// Implicit conversion to desired type
|
||||
constexpr operator T1() const
|
||||
{
|
||||
return static_cast<T1>(Value);
|
||||
}
|
||||
};
|
||||
|
||||
// Recursion terminator
|
||||
template <typename T, T Value>
|
||||
struct multicast<T, Value, void>
|
||||
{
|
||||
constexpr multicast() = default;
|
||||
|
||||
// Explicit conversion to base type
|
||||
explicit constexpr operator T() const
|
||||
{
|
||||
return Value;
|
||||
}
|
||||
};
|
||||
|
||||
// Error code type (return type), implements error reporting. Could be a template.
|
||||
struct error_code
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue