Use fmt/ostream.h’s implementation to generate formatter against ostream

fmt 11 requires it.
This commit is contained in:
Emmanuel Gil Peyrot 2024-12-29 19:07:48 +01:00
parent f27ab78177
commit 278db8d1f8
2 changed files with 10 additions and 0 deletions

View file

@ -2044,5 +2044,11 @@ std::ostream& operator<<(std::ostream& os, const HandlePrinter& printer);
} // namespace HLE
template <> struct fmt::formatter<HLE::OS::ProcessPrinter> : ostream_formatter {};
template <> struct fmt::formatter<HLE::OS::ThreadPrinter> : ostream_formatter {};
template <> struct fmt::formatter<HLE::OS::ObjectRefPrinter> : ostream_formatter {};
template <> struct fmt::formatter<HLE::OS::ObjectPrinter> : ostream_formatter {};
template <> struct fmt::formatter<HLE::OS::HandlePrinter> : ostream_formatter {};
// Now that we're done with the definitions, include some definitions that are required to instantiate the above structs (e.g. due to unique_ptr being used on incomplete types)
#include "gdb_stub.h"

View file

@ -24,6 +24,8 @@
#include <iostream>
#include <sstream>
#include <fmt/ostream.h>
std::vector<uint64_t>* nand_titles = nullptr;
namespace std {
@ -36,6 +38,8 @@ static std::ostream& operator<<(std::ostream& os, const Platform::PXI::PM::Progr
} // namespace std
template <> struct fmt::formatter<Platform::PXI::PM::ProgramInfo> : ostream_formatter {};
namespace HLE {
// namespace OS {