| |||
| Home > Inline and Embedded Assemblers > Embedded assembler > Manual overload resolution | |||
You can use C++ casts to do overload resolution for non-virtual function calls. For example:
void g(int);
void g(long);
struct T {
int mf(int);
int mf(int,int);
};
__asm void f(T*, int, int) {
BL __cpp(static_cast<int (T::*)(int, int)>(&T::mf)) // calls T::mf(int, int)
BL __cpp(static_cast<void (*)(int)>(g)) // calls g(int)
MOV pc, lr
}