12 Oct
2006
12 Oct
'06
10:34 p.m.
Marko Riedel wrote:
Richard B. Kreckel writes:
I suppose that should work (I haven't actually tested it):
typedef std::set<GiNaC::ex, GiNaC::ex_is_less> myset; // shorthand myset* inst; inst = (myset*)malloc(sizeof(myset)); // or get inst from elsewhere new(inst) myset; // do stuff to *inst here... inst->~myset(); delete inst;
Okay, one last remark: the malloc should be matched up with a free, right? Giving the sequence
inst = (myset*)malloc(sizeof(myset)); // or get inst from elsewhere new(inst) myset; // do stuff to *inst here... inst->~myset(); free(inst);
Yes. The example I gave was in error. -richy. -- Richard B. Kreckel <http://www.ginac.de/~kreckel/>