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

Alexei Sheplyakov varg at theor.jinr.ru
Tue Apr 1 09:47:57 CEST 2008


Hello!

On Sat, Mar 29, 2008 at 10:20:00PM +0100, Richard B. Kreckel wrote:
 
> 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?

It is wrong.

> And Why?

Because it declares the same function to be inline and non-inline, 
which violates the standard (7.1.2.4).

> It's not wrong.

It *is* wrong, but [sometimes] it happens to work.

Best regards,
	Alexei

-- 
All science is either physics or stamp collecting.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: Digital signature
Url : http://www.cebix.net/pipermail/cln-list/attachments/20080401/46ca9da8/attachment.sig 


More information about the CLN-list mailing list