mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 19:29:31 +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()]) ();
|
||
|
}
|