[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Texmacs-dev] "Overloading ambiguity" error in compiling 1.0.7.2
From: |
Matthias Berndt |
Subject: |
Re: [Texmacs-dev] "Overloading ambiguity" error in compiling 1.0.7.2 |
Date: |
Tue, 14 Jul 2009 15:37:35 +0200 |
User-agent: |
KMail/1.11.4 (Linux/2.6.29-1-686; KDE/4.2.4; i686; ; ) |
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?
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Texmacs-dev] "Overloading ambiguity" error in compiling 1.0.7.2,
Matthias Berndt <=