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: Ben Abbott
Subject: Re: error: target of using declaration conflicts with declaration already in scope
Date: Wed, 01 Jun 2016 19:55:33 -0400

> On Jun 1, 2016, at 3:59 PM, John W. Eaton <address@hidden> wrote:
> 
> 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
> 
> <diffs.txt>

Almost there.

  CXX      libinterp/dldfcn/libinterp_dldfcn___delaunayn___la-__delaunayn__.lo
In file included from libinterp/dldfcn/__delaunayn__.cc:50:
In file included from libinterp/corefcn/Cell.h:33:
In file included from ./libinterp/octave-value/ov.h:35:
In file included from ./liboctave/array/Range.h:30:
In file included from ./liboctave/array/dMatrix.h:28:
In file included from ./liboctave/array/dNDArray.h:28:
In file included from ./liboctave/array/MArray.h:30:
In file included from liboctave/operators/mx-inlines.cc:41:
In file included from ./liboctave/util/oct-inttypes.h:36:
liboctave/numeric/lo-mappers.h:474:40: error: no viable conversion from 
'complex<double>' to 'double'
inline double conj (double x) { return octave::math::conj (x); }
                                       ^~~~~~~~~~~~~~~~~~~~~~
liboctave/numeric/lo-mappers.h:476:38: error: no viable conversion from 
'complex<float>' to 'float'
inline float conj (float x) { return octave::math::conj (x); }
                                     ^~~~~~~~~~~~~~~~~~~~~~
libinterp/dldfcn/__delaunayn__.cc:197:19: warning: use of old-style cast 
[-Wold-style-cast]
                  FOREACHvertex_ (facet->vertices)
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/sw/include/libqhull/libqhull.h:912:34: note: expanded from macro 
'FOREACHvertex_'
#define FOREACHvertex_(vertices) FOREACHsetelement_(vertexT, vertices,vertex)
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/sw/include/libqhull/qset.h:137:24: note: expanded from macro 
'FOREACHsetelement_'
          variable##p= (type **)&((set)->e[0].p); \
                       ^        ~~~~~~~~~~~~~~~~
1 warning and 2 errors generated.

Ben





reply via email to

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