Hi, on the TeXmacs mailing list, I recently read this: > > It seems to me, this language feature allows you to exactly "redefine > > the new operator for TeXmacs objects only (avoiding interaction with > > Qt)". > > Sure, I know this. On the first place, this would require me to carefully > add new methods to all TeXmacs classes. I don't understand this argument. How does adding operator new to a base class force you to add new methods to the derived classes? After all, the point in derivation is that you only have to define new methods if they differ from the ones defined in the base class. > More annoyingly, this only refines new > for the classes added by TeXmacs, not standard C++ classes such as int, > or classes that I might use from other libraries. With a little SFINAE and tr1 type traits, it should be easy to replace operator new for builtin types. Also, didn't you say in your original email that the goal was to overload operator new for TeXmacs types only?
_______________________________________________ Texmacs-dev mailing list [email protected] http://lists.gnu.org/mailman/listinfo/texmacs-dev
