blob: b1677bc203d5d8e9b082832027d4d00aaad54a13 (
plain)
1
2
3
4
5
6
7
8
9
10
|
struct Evil {
void fun ();
};
int foo();
typedef void (Evil::*memfunptr) ();
static memfunptr jumpTable[] = { &Evil::fun };
void Evil::fun() {
(this->*jumpTable[foo()]) ();
}
|