Re: Clone function (pure virtual base class)

Originally Posted by
Oliver M.
The OP obviously does not want to create a typical clone function. I think he wants to create an object of a type that is defined dynamically by the type of another object. Thus he wants to 'clone' the type of an object with different data.
Maybe some kind of class factory e.g. like the MFC RuntimeClass would be appropriate here?!
In which case, I'd strongly suggest thinking up a different name for the function, just to avoid confusion down the line.
Correct is better than fast. Simple is better than complex. Clear is better than cute. Safe is better than insecure.
-- Sutter and Alexandrescu, C++ Coding Standards
Programs must be written for people to read, and only incidentally for machines to execute.
-- Harold Abelson and Gerald Jay Sussman
The cheapest, fastest and most reliable components of a computer system are those that aren't there.
-- Gordon Bell