dld@F.GP.CS.CMU.EDU (David Detlefs) (12/08/87)
I have a problem: I have a base class that I would like to have use a specialized storage allocator. I would also like, if possible, all classes derived from this class to use this storage allocator. I have two questions: 1) Is there some easy way to do this that I'm missing? I realize that I can do it by writing the appropriate assignments to this in the constructors of the derived classes, but I'd really like it to happen automatically as a result of something I specify in the base class. 2) Assuming that no one has a whizzy answer to the first question, will the overloadability of operator new in the next version of C++ solve my problem? Will I be able to do something like make operator new a public (or protected?) member of the base class, and have the derived classes automatically use it? Thanks. Dave