common: Convert type traits templates over to variable template versions where applicable
Uses the C++17 inline variable variants
This commit is contained in:
parent
a74ba1cd59
commit
bf964ac6e9
5 changed files with 16 additions and 12 deletions
|
@ -34,7 +34,7 @@ inline bool IsWithin2G(const Xbyak::CodeGenerator& code, uintptr_t target) {
|
|||
|
||||
template <typename T>
|
||||
inline void CallFarFunction(Xbyak::CodeGenerator& code, const T f) {
|
||||
static_assert(std::is_pointer<T>(), "Argument must be a (function) pointer.");
|
||||
static_assert(std::is_pointer_v<T>, "Argument must be a (function) pointer.");
|
||||
size_t addr = reinterpret_cast<size_t>(f);
|
||||
if (IsWithin2G(code, addr)) {
|
||||
code.call(f);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue