mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-01-20 07:30:24 +01:00
rx/format: fix compilation with clang
This commit is contained in:
parent
0d0b75f686
commit
fc4339d841
|
|
@ -197,16 +197,20 @@ struct std::formatter<T> {
|
|||
std::integral_constant<std::int64_t, Offset>,
|
||||
std::integer_sequence<std::int64_t, I...>) -> std::string {
|
||||
std::string_view result;
|
||||
auto queryIndex = [&]<std::int64_t Index>(
|
||||
std::integral_constant<std::int64_t, Index>,
|
||||
std::int64_t value) {
|
||||
if (value == Index) {
|
||||
if constexpr (requires { rx::getNameOf<static_cast<T>(Index)>(); }) {
|
||||
result = rx::getNameOf<static_cast<T>(Index)>();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (value < 0) {
|
||||
((-value == I + Offset
|
||||
? ((result = rx::getNameOf<static_cast<T>(-(I + Offset))>()), 0)
|
||||
: 0),
|
||||
...);
|
||||
(queryIndex(std::integral_constant<std::int64_t, -(I + Offset)>{}, value), ...);
|
||||
} else {
|
||||
((value == I + Offset
|
||||
? ((result = rx::getNameOf<static_cast<T>(I + Offset)>()), 0)
|
||||
: 0),
|
||||
...);
|
||||
(queryIndex(std::integral_constant<std::int64_t, I + Offset>{}, value), ...);
|
||||
}
|
||||
|
||||
if (!result.empty()) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue