Lars Gullik Bjønnes wrote: > | Because the code using it does exactly the same as Inset::clone. Just > | passes a pointer around safely. > > But you are not passing it... isn't it a static class variable?
The factory function is static, but the transformer itself is not. Each transformer holds a copy of the data it is to transform. I couldn't make the thing stateless before because I needed the front(), back() member functions to have the same signature. Now that you have shown me how to use boost::any that could change. string const RotationLatexCommand::front(RotationData const &) const; (or indeed I could use a static function). That would certainly get rid of the auto_ptr stuff. Let's see how this all evolves. Thanks for the spelling tips ;-) -- Angus