1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 02:32:36 +01:00

Update types.h to fix static_cast test (#8627)

Trivial fix up to resolve invalid is_constructible test (To,To) to match desired (To,From)
This commit is contained in:
Bevan Weiss 2020-07-25 18:46:47 +10:00 committed by GitHub
parent de80a4b6c7
commit c5d39ace2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,7 +94,7 @@ namespace std
{
static_assert(sizeof(To) == sizeof(From), "std::bit_cast<>: incompatible type size");
if constexpr ((std::is_same_v<std::remove_const_t<To>, std::remove_const_t<From>> && std::is_constructible_v<To, To>) || (std::is_integral_v<From> && std::is_integral_v<To>))
if constexpr ((std::is_same_v<std::remove_const_t<To>, std::remove_const_t<From>> && std::is_constructible_v<To, From>) || (std::is_integral_v<From> && std::is_integral_v<To>))
{
return static_cast<To>(from);
}