Fix unresolved symbols in testcase
This commit is contained in:
parent
463b2a324c
commit
140782054a
1 changed files with 7 additions and 0 deletions
|
|
@ -62,6 +62,9 @@ public:
|
||||||
void PrintK() {std::cerr << k << std::endl;}
|
void PrintK() {std::cerr << k << std::endl;}
|
||||||
|
|
||||||
int k;
|
int k;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct Op2 {
|
||||||
void *operator new
|
void *operator new
|
||||||
(size_t); // definition split over two lines was giving syntax error
|
(size_t); // definition split over two lines was giving syntax error
|
||||||
void operator delete /* comment here did not work */ (void *);
|
void operator delete /* comment here did not work */ (void *);
|
||||||
|
|
@ -69,4 +72,8 @@ public:
|
||||||
delete[] (void *);
|
delete[] (void *);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void *Op2::operator new(size_t) { return malloc(sizeof(Op)); }
|
||||||
|
void Op2::operator delete(void *p) { free(p); }
|
||||||
|
void Op2::operator delete[] (void *) {}
|
||||||
|
|
||||||
%}
|
%}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue