mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-02 07:32:52 +00:00
11 lines
178 B
C++
11 lines
178 B
C++
|
struct Evil {
|
||
|
void fun ();
|
||
|
};
|
||
|
int foo();
|
||
|
typedef void (Evil::*memfunptr) ();
|
||
|
static memfunptr jumpTable[] = { &Evil::fun };
|
||
|
|
||
|
void Evil::fun() {
|
||
|
(this->*jumpTable[foo()]) ();
|
||
|
}
|