mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-28 13:28:01 +03:00
rsx: Fix printing of expected values
This commit is contained in:
parent
c7fed20f3c
commit
439bdde849
5 changed files with 66 additions and 3 deletions
|
@ -237,6 +237,29 @@ struct fmt_class_string<wchar_t*, void> : fmt_class_string<const wchar_t*>
|
|||
{
|
||||
};
|
||||
|
||||
namespace fmt
|
||||
{
|
||||
template <typename T>
|
||||
concept StringConvertible = requires (T & t)
|
||||
{
|
||||
{ t.to_string() } -> std::convertible_to<std::string>;
|
||||
};
|
||||
}
|
||||
|
||||
template <fmt::StringConvertible T>
|
||||
struct fmt_class_string<T, void>
|
||||
{
|
||||
static FORCE_INLINE SAFE_BUFFERS(const T&) get_object(u64 arg)
|
||||
{
|
||||
return *reinterpret_cast<const T*>(static_cast<uptr>(arg));
|
||||
}
|
||||
|
||||
static void format(std::string& out, u64 arg)
|
||||
{
|
||||
out += get_object(arg).to_string();
|
||||
}
|
||||
};
|
||||
|
||||
namespace fmt
|
||||
{
|
||||
// Both uchar and std::byte are allowed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue