octave-maintainers
[Top][All Lists]
Advanced

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

Re: problem with changeset fa917f1f0faf


From: Carnë Draug
Subject: Re: problem with changeset fa917f1f0faf
Date: Thu, 11 Aug 2016 01:37:55 +0100

On 11 August 2016 at 00:47, Ben Abbott <address@hidden> wrote:
> Carne,
>
> I think I’m seeing an error associated with the change below.
>
>         http://hg.savannah.gnu.org/hgweb/octave/rev/fa917f1f0faf
>
> [...]
>
> liboctave/array/MatrixType.cc:530:23: error: assigning to 'double' from 
> incompatible type 'complex<double>'
>                     d = std::conj (d);
>                       ^ ~~~~~~~~~~~~~

How does your compiler handles this?

    #include <iostream>
    #include <complex>
    #include <typeinfo>

    int main()
    {
      std::cout << typeid (std::conj (double (5.0))).name() << std::endl;
    }

If you get back a complex number, the issue is discussed on DR 1137 [1].
You should get back d for double.  I only found this DR number because
it's refered on the GCC implementation of conj.

Carnë

[1] https://lwg.github.io/issues/lwg-defects.html#1137



reply via email to

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