[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem with changeset fa917f1f0faf
From: |
Mike Miller |
Subject: |
Re: problem with changeset fa917f1f0faf |
Date: |
Wed, 10 Aug 2016 18:07:08 -0700 |
User-agent: |
Mutt/1.6.2-neo (2016-07-23) |
On Wed, Aug 10, 2016 at 20:51:31 -0400, Ben Abbott 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’m out of my element … I placed those lines in foo.cc and compiled using
> Apple’s clang
I took the liberty of testing with clang 3.8 on Debian.
With clang and llvm libc++, I get similar errors about streams and char_traits.
With clang and gcc libstdc++, I get the following:
address@hidden:~/src$ clang-3.8 -o foo foo.cc
foo.cc:7:24: error: no matching function for call to 'conj'
std::cout << typeid (std::conj (double (5.0))).name() << std::endl;
^~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/6.1.1/../../../../include/c++/6.1.1/complex:677:5:
note: candidate template ignored: could not match
'complex<type-parameter-0-0>' against 'double'
conj(const complex<_Tp>& __z)
^
1 error generated.
--
mike
- problem with changeset fa917f1f0faf, Ben Abbott, 2016/08/10
- Re: problem with changeset fa917f1f0faf, Carnë Draug, 2016/08/10
- Re: problem with changeset fa917f1f0faf, Ben Abbott, 2016/08/10
- Re: problem with changeset fa917f1f0faf,
Mike Miller <=
- Re: problem with changeset fa917f1f0faf, Carnë Draug, 2016/08/10
- Re: problem with changeset fa917f1f0faf, Ben Abbott, 2016/08/11
- Re: problem with changeset fa917f1f0faf, Carnë Draug, 2016/08/11
- Re: problem with changeset fa917f1f0faf, Ben Abbott, 2016/08/11
- Re: problem with changeset fa917f1f0faf, Ben Abbott, 2016/08/11
- Re: problem with changeset fa917f1f0faf, Sebastian Schöps, 2016/08/11
- Re: problem with changeset fa917f1f0faf, John W. Eaton, 2016/08/11
- Re: problem with changeset fa917f1f0faf, John W. Eaton, 2016/08/11
- Re: problem with changeset fa917f1f0faf, Ben Abbott, 2016/08/11
- Re: problem with changeset fa917f1f0faf, Sebastian, 2016/08/12