I want to get the address of a function at compile time and then do some mathematical operation to it. I'm able to get the function address in compile time doing this:
constexpr DWORD addr = (DWORD)Function;
But when I try to do some matematical operation to it, I get the error "Conversion is invalid in constant-expression evaluation":
constexpr DWORD addr = (DWORD)Function >> 3;
I also tried this:
constexpr void(*addr)() = Test >> 3;
But it's not possible to do mathematical operations on void pointers as long as I understand. Is there any way to do this?