From 082902c2e4cc0a1a6406cb9c19b0a9709b4645db Mon Sep 17 00:00:00 2001 From: Yang Liu Date: Tue, 26 May 2026 11:32:23 +0800 Subject: [PATCH] [dynarmic] add tuple constructor to Matcher MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GetName, GetNameArm, and other similar functions introduced lately initialize a `std::vector` from a macro-expanded brace list: std::vector>> list = { { name, DYNARMIC_DECODER_GET_MATCHER(...) }, ... }; ... but DYNARMIC_DECODER_GET_MATCHER returns `std::tuple`, which cannot initialize Matcher on my side: error: could not convert ‘{{"VMLA", ...}’ from ‘’ to ‘...’ This commit adds an explicit tuple constructor so it compiles. --- src/dynarmic/src/dynarmic/frontend/decoder/matcher.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/dynarmic/src/dynarmic/frontend/decoder/matcher.h b/src/dynarmic/src/dynarmic/frontend/decoder/matcher.h index 49095f67e3..77fb7d941f 100644 --- a/src/dynarmic/src/dynarmic/frontend/decoder/matcher.h +++ b/src/dynarmic/src/dynarmic/frontend/decoder/matcher.h @@ -9,6 +9,7 @@ #pragma once #include +#include #include "common/assert.h" @@ -31,6 +32,10 @@ public: , expected{expected} {} + constexpr Matcher(std::tuple t) noexcept + : Matcher(std::get<0>(t), std::get<1>(t)) + {} + /// @brief Gets the mask for this instruction. constexpr inline T GetMask() const noexcept { return mask;