bug: get_precedence() is not working
Pearu Peterson
pearu at cens.ioc.ee
Sat May 19 02:05:40 CEST 2001
On Fri, 18 May 2001, Christian Bauer wrote:
> Hi!
>
> On Thu, May 17, 2001 at 11:22:21PM +0200, Pearu Peterson wrote:
> > seems that simplest solution is inserting the following line
> > public: unsigned get_precedence(void) const {return precedence;}
> > to the macro GNAC_DECLARE_REGISTERED_CLASS
>
> This seems to work.
Sorry to bother again but it does not. Namely, some classes, such as
symbol, does not use GNAC_DECLARE_REGISTERED_CLASS, and as a consequence
one cannot use symbol::get_precedence() (which is silly, of cource).
As a fix (to the latest CVS version), there are two possibilities:
1) put basic::get_precedence() back again --- this will work if it is
**absolutely sure** that classes with no storage will not define their own
precedence (not now and not in future).
2) insert
public: unsigned get_precedence(void) const {return precedence;}
to macro
GINAC_DECLARE_REGISTERED_CLASS_NO_CTORS
so that all GiNaC classes will have their own get_precedence() method.
I think this is safest solution.
Regards,
Pearu
More information about the GiNaC-devel
mailing list