mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-10 07:14:21 +00:00
Add MATCH macro
This commit is contained in:
parent
6cc7d1fb26
commit
76bac80dde
@ -45,6 +45,9 @@
|
||||
// Return 32 bit alignof() to avoid widening/narrowing conversions with size_t
|
||||
#define ALIGN_32(...) static_cast<u32>(alignof(__VA_ARGS__))
|
||||
|
||||
// Variant pattern matching helper
|
||||
#define MATCH(arg, ...) constexpr(std::is_same_v<std::decay_t<decltype(arg)>, __VA_ARGS__>)
|
||||
|
||||
#define CONCATENATE_DETAIL(x, y) x ## y
|
||||
#define CONCATENATE(x, y) CONCATENATE_DETAIL(x, y)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user