octave-maintainers
[Top][All Lists]
Advanced

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

Re: error: target of using declaration conflicts with declaration alread


From: John W. Eaton
Subject: Re: error: target of using declaration conflicts with declaration already in scope
Date: Wed, 1 Jun 2016 15:59:56 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0

On 05/31/2016 02:25 PM, Ben Abbott wrote:
John/others,

I’m seeing the error below on Mac OS X. I’m using Apple’s clang to build.

Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin14.5.0
Thread model: posix

Bisecting produced the result below.

The first bad revision is:
changeset:   21782:2aef506f3fec
user:        John W. Eaton <address@hidden>
date:        Wed May 25 16:51:16 2016 -0400
summary:     use namespace for lo-mappers.h functions

I’m not proficient enough with c++ to understand what is happening, but am 
happy to attempt a fix if it is easier for someone to explain to me what needs 
to be done. if additional information is needed from my end, please let me know.

Ben

   CXX      libinterp/libinterp_liboctinterp_la-octave.lo
In file included from libinterp/dldfcn/__delaunayn__.cc:50:
In file included from libinterp/corefcn/Cell.h:31:
In file included from ./liboctave/array/Array.h:38:
In file included from ./liboctave/array/idx-vector.h:38:
In file included from ./liboctave/util/oct-inttypes.h:36:
liboctave/numeric/lo-mappers.h:61:16: error: target of using declaration 
conflicts with declaration already in scope
     using std::arg;
                ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/complex:907:1:
 note: target of using declaration
arg(double __re)
^
liboctave/numeric/lo-mappers.h:58:19: note: conflicting declaration
     inline double arg (double x) { return atan2 (0.0, x); }
                   ^
liboctave/numeric/lo-mappers.h:61:16: error: target of using declaration 
conflicts with declaration already in scope
     using std::arg;

I was hoping to import existing versions of some standard functions into the octave::math namespace without having to write wrappers. The using declaration seemed to work with GCC. But I see that for some of these, C++ now provides versions for complex<T> and T arguments. I don't know how long that has been true, but I didn't notice until now. Could you try the attached patch?

Thanks,

jwe

Attachment: diffs.txt
Description: Text document


reply via email to

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