mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-06-06 09:23:44 -04:00
[dynarmic] add tuple constructor to Matcher
GetName, GetNameArm, and other similar functions introduced lately initialize
a `std::vector<std::pair>` from a macro-expanded brace list:
std::vector<std::pair<std::string_view, Matcher<V>>> list = {
{ name, DYNARMIC_DECODER_GET_MATCHER(...) },
...
};
... but DYNARMIC_DECODER_GET_MATCHER returns `std::tuple<u32, u32>`, which cannot
initialize Matcher<V> on my side:
error: could not convert ‘{{"VMLA", ...}’
from ‘<brace-enclosed initializer list>’ to ‘...’
This commit adds an explicit tuple constructor so it compiles.
This commit is contained in:
parent
035031937a
commit
082902c2e4
1 changed files with 5 additions and 0 deletions
|
|
@ -9,6 +9,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
#include <tuple>
|
||||
|
||||
#include "common/assert.h"
|
||||
|
||||
|
|
@ -31,6 +32,10 @@ public:
|
|||
, expected{expected}
|
||||
{}
|
||||
|
||||
constexpr Matcher(std::tuple<T, T> 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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue