bug: get_precedence() is not working

Richard B. Kreckel kreckel at thep.physik.uni-mainz.de
Wed May 16 15:51:39 CEST 2001


On Wed, 16 May 2001, Pearu Peterson wrote:
> It seems to me that one has to define for each class, that redefines
> basic::precedence, also the get_precedence() function. Clearly it is not
> C++ way, but may be it is due to that basic::precedence is defined static.
> Sorry, but right now I don't have any idea how to fix it...

Thanks Pearu for the bugreport.  Your analysis is correct.

Christian, we've had the same trouble when we tried to make
default_overall_coeff() an inline function in class expairseq returning
a protected static ex(1) or ex(0) respectively for classes mul and add.
This just doesn't work with static member variables.  All alternatives
which come to my mind are either preprocessor-based or replicate data and
either way as ugly as sin.  Any really good suggestion?

Regards
     -richy.
-- 
Richard Kreckel
<Richard.Kreckel at Uni-Mainz.DE>
<http://wwwthep.physik.uni-mainz.de/~kreckel/>





More information about the GiNaC-devel mailing list