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 17:15:45 +0100

On 11 August 2016 at 16:03, Ben Abbott <address@hidden> wrote:
>> On Aug 10, 2016, at 21:29, Carnë Draug <address@hidden> wrote:
>>
>> On 11 August 2016 at 01:51, Ben Abbott <address@hidden> wrote:
>>>> On Aug 10, 2016, at 8:37 PM, Carnë Draug <address@hidden> wrote:
>>>>
>>>>> 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
>>>
>>> [...]
>> [...]
>>
>> I will guess that replacing std::conj with octave::numeric::conj will also
>> trigger this issue.  Octave's conj() is now just imported from std [2].
>> If my guess is right, then I guess this means that octave::numeric::conj
>> is never used in Octave for real types.
>>
>> Carnë
>>
>> [2] 
>> http://hg.savannah.gnu.org/hgweb/octave/file/e43d83253e28/liboctave/numeric/lo-mappers.h#l64
>
> I assume this traced back to changeset 9c3a3d252e80?
>

If replacing std::conj with octave::numeric::conj on MatrixType does not
fix the issue, then yes.  The issue is at 9c3a3d252e80 and the fix should
be there.  Can you confirm that there's an issue there?



reply via email to

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