octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiling octave with MSVC


From: John W. Eaton
Subject: Re: Compiling octave with MSVC
Date: Tue, 10 Oct 2006 16:21:43 -0400

On 10-Oct-2006, Michael Goffioul wrote:

| #define NDS_CMP_OP2(F, OP, ND, NDC, S, SC, SPEC1, SPEC2) \
|   boolNDArray \
|   F (const ND& m, const S& s) \
|   { \
|     boolNDArray r; \
|  \
|     int len = m.length (); \
|  \
|     r.resize (m.dims ()); \
|  \
|     for (int i = 0; i < len; i++) \
|       r.elem(i) = operator OP <SPEC1,SPEC2> (NDC (m.elem(i)), SC (s)); \
|  \
|     return r; \
|   }

Another thought.  If SPEC1 and SPEC2 are the types of the operands to
OP, then does it work to write

  operator OP <typeof(m.elem(i)), typeof(s)> (NDC (m.elem(i)), SC (s));

instead?  If so, then I think we can avoid changing the interface of
the macro.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]