mirror of
https://github.com/yuzu-mirror/dynarmic.git
synced 2026-04-21 06:03:42 +00:00
emit_x64_vector: More explicit lambda decay
This commit is contained in:
parent
3afd2fcbad
commit
b062266b8e
2 changed files with 15 additions and 2 deletions
|
|
@ -13,7 +13,9 @@ namespace Dynarmic::mp {
|
|||
|
||||
/// Used to provide information about an arbitrary function.
|
||||
template <typename Function>
|
||||
struct FunctionInfo;
|
||||
struct FunctionInfo : public FunctionInfo<decltype(&Function::operator())>
|
||||
{
|
||||
};
|
||||
|
||||
/**
|
||||
* Partial specialization for function types.
|
||||
|
|
@ -32,6 +34,8 @@ struct FunctionInfo<R(Args...)>
|
|||
static_assert(args_count != 0 && ParameterIndex < args_count, "Non-existent function parameter index");
|
||||
using type = std::tuple_element_t<ParameterIndex, std::tuple<Args...>>;
|
||||
};
|
||||
|
||||
using equivalent_function_type = R(Args...);
|
||||
};
|
||||
|
||||
/// Partial specialization for function pointers
|
||||
|
|
@ -79,4 +83,12 @@ using return_type_t = typename FunctionInfo<Function>::return_type;
|
|||
template <typename Function>
|
||||
using class_type_t = typename FunctionInfo<Function>::class_type;
|
||||
|
||||
/**
|
||||
* Helper template for retrieving the equivalent function type of a member function or functor.
|
||||
*
|
||||
* @tparam Function The function type to get the return type of.
|
||||
*/
|
||||
template <typename Function>
|
||||
using equivalent_function_type_t = typename FunctionInfo<Function>::equivalent_function_type;
|
||||
|
||||
} // namespace Dynarmic::mp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue