mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-03-25 18:02:57 +00:00
emit_x64_vector: More explicit lambda decay
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user