
Hello, I'm trying to use inplace factories on a class that performs small object optimization. If the user code pass me an inplace factory and the optimization can be done, everything is fine, but how should I handle the case in which the optimization cannot be done? Can inplace factory export an other method, that will invoke new T() with the appropriate parameters and return the pointer to it? I can't see how to do this transparently without inplace factory support, because I don't know a way to call the correct operator new if it is defined in the class ( T::operator new(sizeof(T)) works only if T declares the operator ). Corrado -- __________________________________________________________________________ dott. Corrado Zoccolo mailto:zoccolo@di.unipi.it PhD - Department of Computer Science - University of Pisa, Italy -------------------------------------------------------------------------- The self-confidence of a warrior is not the self-confidence of the average man. The average man seeks certainty in the eyes of the onlooker and calls that self-confidence. The warrior seeks impeccability in his own eyes and calls that humbleness. Tales of Power - C. Castaneda