gnucap-devel
[Top][All Lists]
Advanced

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

Re: [Gnucap-devel] complex. (was: jfet plugin)


From: Felix Salfelder
Subject: Re: [Gnucap-devel] complex. (was: jfet plugin)
Date: Mon, 14 Jul 2014 12:27:10 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Jul 08, 2014 at 01:15:52PM -0500, wikitronic wrote:
> I hope you don't mind me adding a second question. I'm cross compiling to
> javasacript with emscripten. I was hoping to link the module into the main
> program because emscripten is picky about dynamic linking. I have this one
> line of code that is really confusing me.
> 
> In spice-wrapper.cc 1235.
> 
> _matrix[ii][jj].real() = 0;
> error: expression is not assignable
> 
> could you please tell me what this does and maybe I can fix the compiler
> error.

_matrix[ii][jj] is (should be) an std::complex<double>.

i thought std::complex<T> has a T& real(). apparently my implementation
has one, and it's been used and working forever. but e.g. [1,2] do not
list it, so you might have discovered a bug :)

anyway, if .real() = rvalue does not work for you, try .real(rvalue).

cheers
felix

[1] http://en.cppreference.com/w/cpp/numeric/complex/real
[2] http://stdcxx.apache.org/doc/stdlibref/complex-h.html



reply via email to

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