[CLN-list] const cl_LF operator- (const cl_LF& x, const cl_LF& y)

Richard B. Kreckel kreckel at ginac.de
Sat Mar 29 22:20:00 CET 2008


Hi!

zhaoxinjian wrote:
>   I find that the function ( const cl_LF operator- (const cl_LF& x, const cl_LF& y) ) in cl_LF.h and in cl_LF_2mimus.cc is different!
>  In cl_LF.h:
>  inline const cl_LF operator- (const cl_LF& x, const cl_LF& y)  \
> {         \
> return LF_LF_minus_LF(x,y);     \
> } 
> In cl_LF_2mimus.cc :
> const cl_LF operator- (const cl_LF& x1, const cl_LF& x2)
> { GEN_LF_OP2(x1,x2,LF_LF_minus_LF,return) }
> 
> }  // namespace cln 
> Is it wrong? And Why?

It's not wrong. The first operator-() is part of a macro. It is an 
optimization, applicable as described in the comment above that macro.

   -richy.
-- 
Richard B. Kreckel
<http://www.ginac.de/~kreckel/>


More information about the CLN-list mailing list