diff --git a/CMakeLists.txt b/CMakeLists.txt index cbeb2ee689..67bdf6afe9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -279,8 +279,6 @@ endif() # Configure C++ standard # =========================== -# boost asio's concept usage doesn't play nicely with some compilers yet. -add_definitions(-DBOOST_ASIO_DISABLE_CONCEPTS) if (MSVC) add_compile_options($<$:/std:c++20>) diff --git a/src/common/logging/formatter.h b/src/common/logging/formatter.h index 88e55505de..16bddde8fe 100644 --- a/src/common/logging/formatter.h +++ b/src/common/logging/formatter.h @@ -14,7 +14,7 @@ template struct fmt::formatter, char>> : formatter> { template - auto format(const T& value, FormatContext& ctx) -> decltype(ctx.out()) { + auto format(const T& value, FormatContext& ctx) const -> decltype(ctx.out()) { return fmt::formatter>::format( static_cast>(value), ctx); } diff --git a/src/common/typed_address.h b/src/common/typed_address.h index d5e743583d..a1deb89a04 100644 --- a/src/common/typed_address.h +++ b/src/common/typed_address.h @@ -262,7 +262,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Common::PhysicalAddress& addr, FormatContext& ctx) { + auto format(const Common::PhysicalAddress& addr, FormatContext& ctx) const { return fmt::format_to(ctx.out(), "{:#x}", static_cast(addr.GetValue())); } }; @@ -273,7 +273,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Common::ProcessAddress& addr, FormatContext& ctx) { + auto format(const Common::ProcessAddress& addr, FormatContext& ctx) const { return fmt::format_to(ctx.out(), "{:#x}", static_cast(addr.GetValue())); } }; @@ -284,7 +284,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Common::VirtualAddress& addr, FormatContext& ctx) { + auto format(const Common::VirtualAddress& addr, FormatContext& ctx) const { return fmt::format_to(ctx.out(), "{:#x}", static_cast(addr.GetValue())); } }; diff --git a/src/core/arm/dynarmic/dynarmic_cp15.cpp b/src/core/arm/dynarmic/dynarmic_cp15.cpp index f3eee0d42a..ee97ac6395 100644 --- a/src/core/arm/dynarmic/dynarmic_cp15.cpp +++ b/src/core/arm/dynarmic/dynarmic_cp15.cpp @@ -22,7 +22,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Dynarmic::A32::CoprocReg& reg, FormatContext& ctx) { + auto format(const Dynarmic::A32::CoprocReg& reg, FormatContext& ctx) const { return fmt::format_to(ctx.out(), "cp{}", static_cast(reg)); } }; diff --git a/src/core/debugger/gdbstub.cpp b/src/core/debugger/gdbstub.cpp index 27d45fca5f..22bc71e4d4 100644 --- a/src/core/debugger/gdbstub.cpp +++ b/src/core/debugger/gdbstub.cpp @@ -9,6 +9,7 @@ #include #include +#include #include "common/hex_util.h" #include "common/logging/log.h" diff --git a/src/core/file_sys/system_archive/ng_word.cpp b/src/core/file_sys/system_archive/ng_word.cpp index 13ae1999ee..61b0ed2f7b 100644 --- a/src/core/file_sys/system_archive/ng_word.cpp +++ b/src/core/file_sys/system_archive/ng_word.cpp @@ -10,7 +10,7 @@ namespace FileSys::SystemArchive { namespace NgWord1Data { -constexpr std::size_t NUMBER_WORD_TXT_FILES = 0x10; +[[maybe_unused]] constexpr std::size_t NUMBER_WORD_TXT_FILES = 0x10; // Should this archive replacement mysteriously not work on a future game, consider updating. constexpr std::array VERSION_DAT{0x0, 0x0, 0x0, 0x20}; // 11.0.1 System Version diff --git a/src/core/hle/service/nfc/common/device.cpp b/src/core/hle/service/nfc/common/device.cpp index bf29bb354e..652dff0457 100644 --- a/src/core/hle/service/nfc/common/device.cpp +++ b/src/core/hle/service/nfc/common/device.cpp @@ -15,6 +15,7 @@ #endif #include +#include #include "common/fs/file.h" #include "common/fs/fs.h" diff --git a/src/core/hle/service/psc/time/common.h b/src/core/hle/service/psc/time/common.h index 3e13144a0d..5474e5a0c9 100644 --- a/src/core/hle/service/psc/time/common.h +++ b/src/core/hle/service/psc/time/common.h @@ -167,7 +167,7 @@ constexpr inline Result GetSpanBetweenTimePoints(s64* out_seconds, const SteadyC template <> struct fmt::formatter : fmt::formatter { template - auto format(Service::PSC::Time::TimeType type, FormatContext& ctx) { + auto format(Service::PSC::Time::TimeType type, FormatContext& ctx) const { const string_view name = [type] { using Service::PSC::Time::TimeType; switch (type) { @@ -270,4 +270,4 @@ struct fmt::formatter time_point.rtc_offset, time_point.diff_scale, time_point.shift_amount, time_point.lower, time_point.upper); } -}; \ No newline at end of file +}; diff --git a/src/shader_recompiler/backend/glasm/reg_alloc.h b/src/shader_recompiler/backend/glasm/reg_alloc.h index bd6e2d929c..207a075f19 100644 --- a/src/shader_recompiler/backend/glasm/reg_alloc.h +++ b/src/shader_recompiler/backend/glasm/reg_alloc.h @@ -184,7 +184,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(Shader::Backend::GLASM::Id id, FormatContext& ctx) { + auto format(Shader::Backend::GLASM::Id id, FormatContext& ctx) const { return Shader::Backend::GLASM::FormatTo(ctx, id); } }; @@ -195,7 +195,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Shader::Backend::GLASM::Register& value, FormatContext& ctx) { + auto format(const Shader::Backend::GLASM::Register& value, FormatContext& ctx) const { if (value.type != Shader::Backend::GLASM::Type::Register) { throw Shader::InvalidArgument("Register value type is not register"); } @@ -209,7 +209,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Shader::Backend::GLASM::ScalarRegister& value, FormatContext& ctx) { + auto format(const Shader::Backend::GLASM::ScalarRegister& value, FormatContext& ctx) const { if (value.type != Shader::Backend::GLASM::Type::Register) { throw Shader::InvalidArgument("Register value type is not register"); } @@ -223,7 +223,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Shader::Backend::GLASM::ScalarU32& value, FormatContext& ctx) { + auto format(const Shader::Backend::GLASM::ScalarU32& value, FormatContext& ctx) const { switch (value.type) { case Shader::Backend::GLASM::Type::Void: break; @@ -244,7 +244,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Shader::Backend::GLASM::ScalarS32& value, FormatContext& ctx) { + auto format(const Shader::Backend::GLASM::ScalarS32& value, FormatContext& ctx) const { switch (value.type) { case Shader::Backend::GLASM::Type::Void: break; @@ -265,7 +265,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Shader::Backend::GLASM::ScalarF32& value, FormatContext& ctx) { + auto format(const Shader::Backend::GLASM::ScalarF32& value, FormatContext& ctx) const { switch (value.type) { case Shader::Backend::GLASM::Type::Void: break; @@ -286,7 +286,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Shader::Backend::GLASM::ScalarF64& value, FormatContext& ctx) { + auto format(const Shader::Backend::GLASM::ScalarF64& value, FormatContext& ctx) const { switch (value.type) { case Shader::Backend::GLASM::Type::Void: break; diff --git a/src/shader_recompiler/frontend/ir/attribute.h b/src/shader_recompiler/frontend/ir/attribute.h index 5f039b6f65..407a1f4bc1 100644 --- a/src/shader_recompiler/frontend/ir/attribute.h +++ b/src/shader_recompiler/frontend/ir/attribute.h @@ -250,7 +250,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Shader::IR::Attribute& attribute, FormatContext& ctx) { + auto format(const Shader::IR::Attribute& attribute, FormatContext& ctx) const { return fmt::format_to(ctx.out(), "{}", Shader::IR::NameOf(attribute)); } }; diff --git a/src/shader_recompiler/frontend/ir/condition.h b/src/shader_recompiler/frontend/ir/condition.h index 1cad46b9b9..0b77b6590b 100644 --- a/src/shader_recompiler/frontend/ir/condition.h +++ b/src/shader_recompiler/frontend/ir/condition.h @@ -52,7 +52,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Shader::IR::Condition& cond, FormatContext& ctx) { + auto format(const Shader::IR::Condition& cond, FormatContext& ctx) const { return fmt::format_to(ctx.out(), "{}", Shader::IR::NameOf(cond)); } }; diff --git a/src/shader_recompiler/frontend/ir/flow_test.h b/src/shader_recompiler/frontend/ir/flow_test.h index 88f7c9e82e..f758d13127 100644 --- a/src/shader_recompiler/frontend/ir/flow_test.h +++ b/src/shader_recompiler/frontend/ir/flow_test.h @@ -55,7 +55,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Shader::IR::FlowTest& flow_test, FormatContext& ctx) { + auto format(const Shader::IR::FlowTest& flow_test, FormatContext& ctx) const { return fmt::format_to(ctx.out(), "{}", Shader::IR::NameOf(flow_test)); } }; diff --git a/src/shader_recompiler/frontend/ir/opcodes.h b/src/shader_recompiler/frontend/ir/opcodes.h index e300714f3a..767c5ae15a 100644 --- a/src/shader_recompiler/frontend/ir/opcodes.h +++ b/src/shader_recompiler/frontend/ir/opcodes.h @@ -54,7 +54,7 @@ constexpr Type F64x2{Type::F64x2}; constexpr Type F64x3{Type::F64x3}; constexpr Type F64x4{Type::F64x4}; -constexpr OpcodeMeta META_TABLE[]{ +constexpr OpcodeMeta META_TABLE[] { #define OPCODE(name_token, type_token, ...) \ { \ .name{#name_token}, \ @@ -103,7 +103,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Shader::IR::Opcode& op, FormatContext& ctx) { + auto format(const Shader::IR::Opcode& op, FormatContext& ctx) const { return fmt::format_to(ctx.out(), "{}", Shader::IR::NameOf(op)); } }; diff --git a/src/shader_recompiler/frontend/ir/pred.h b/src/shader_recompiler/frontend/ir/pred.h index a77c1e2a7a..f3f92b063a 100644 --- a/src/shader_recompiler/frontend/ir/pred.h +++ b/src/shader_recompiler/frontend/ir/pred.h @@ -33,7 +33,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Shader::IR::Pred& pred, FormatContext& ctx) { + auto format(const Shader::IR::Pred& pred, FormatContext& ctx) const { if (pred == Shader::IR::Pred::PT) { return fmt::format_to(ctx.out(), "PT"); } else { diff --git a/src/shader_recompiler/frontend/ir/reg.h b/src/shader_recompiler/frontend/ir/reg.h index f7cb716a97..610492759d 100644 --- a/src/shader_recompiler/frontend/ir/reg.h +++ b/src/shader_recompiler/frontend/ir/reg.h @@ -319,7 +319,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Shader::IR::Reg& reg, FormatContext& ctx) { + auto format(const Shader::IR::Reg& reg, FormatContext& ctx) const { if (reg == Shader::IR::Reg::RZ) { return fmt::format_to(ctx.out(), "RZ"); } else if (static_cast(reg) >= 0 && static_cast(reg) < 255) { diff --git a/src/shader_recompiler/frontend/ir/type.h b/src/shader_recompiler/frontend/ir/type.h index 04c8c4ddbe..17b520c6dd 100644 --- a/src/shader_recompiler/frontend/ir/type.h +++ b/src/shader_recompiler/frontend/ir/type.h @@ -54,7 +54,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Shader::IR::Type& type, FormatContext& ctx) { + auto format(const Shader::IR::Type& type, FormatContext& ctx) const { return fmt::format_to(ctx.out(), "{}", NameOf(type)); } }; diff --git a/src/shader_recompiler/frontend/maxwell/location.h b/src/shader_recompiler/frontend/maxwell/location.h index 0c0477e2db..0dd16723a2 100644 --- a/src/shader_recompiler/frontend/maxwell/location.h +++ b/src/shader_recompiler/frontend/maxwell/location.h @@ -102,7 +102,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Shader::Maxwell::Location& location, FormatContext& ctx) { + auto format(const Shader::Maxwell::Location& location, FormatContext& ctx) const { return fmt::format_to(ctx.out(), "{:04x}", location.Offset()); } }; diff --git a/src/shader_recompiler/frontend/maxwell/opcodes.h b/src/shader_recompiler/frontend/maxwell/opcodes.h index 72dd143c2a..b3a493ff6a 100644 --- a/src/shader_recompiler/frontend/maxwell/opcodes.h +++ b/src/shader_recompiler/frontend/maxwell/opcodes.h @@ -23,7 +23,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Shader::Maxwell::Opcode& opcode, FormatContext& ctx) { + auto format(const Shader::Maxwell::Opcode& opcode, FormatContext& ctx) const { return fmt::format_to(ctx.out(), "{}", NameOf(opcode)); } }; diff --git a/src/suyu/main.cpp b/src/suyu/main.cpp index 43511e7b0d..29d3d559d2 100644 --- a/src/suyu/main.cpp +++ b/src/suyu/main.cpp @@ -9,6 +9,8 @@ #include #include +#include + #include "core/hle/service/am/applet_manager.h" #include "core/loader/nca.h" #include "core/loader/nro.h" diff --git a/src/video_core/texture_cache/formatter.h b/src/video_core/texture_cache/formatter.h index cabbfcb2dd..ea1c2df791 100644 --- a/src/video_core/texture_cache/formatter.h +++ b/src/video_core/texture_cache/formatter.h @@ -13,7 +13,7 @@ template <> struct fmt::formatter : fmt::formatter { template - auto format(VideoCore::Surface::PixelFormat format, FormatContext& ctx) { + auto format(VideoCore::Surface::PixelFormat format, FormatContext& ctx) const { using VideoCore::Surface::PixelFormat; const string_view name = [format] { switch (format) { @@ -234,7 +234,7 @@ struct fmt::formatter : fmt::formatter struct fmt::formatter : fmt::formatter { template - auto format(VideoCommon::ImageType type, FormatContext& ctx) { + auto format(VideoCommon::ImageType type, FormatContext& ctx) const { const string_view name = [type] { using VideoCommon::ImageType; switch (type) { @@ -262,7 +262,7 @@ struct fmt::formatter { } template - auto format(const VideoCommon::Extent3D& extent, FormatContext& ctx) { + auto format(const VideoCommon::Extent3D& extent, FormatContext& ctx) const { return fmt::format_to(ctx.out(), "{{{}, {}, {}}}", extent.width, extent.height, extent.depth); }