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

_______________________________________________
Gnucap-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/gnucap-devel

Reply via email to