[Top][All Lists]

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

Re: Compiling Octave 3.2.3 with icpc 10.1 fails: more than one instance

From: Jaroslav Hajek
Subject: Re: Compiling Octave 3.2.3 with icpc 10.1 fails: more than one instance of overloaded function "octave_int_cmp_op::mop"
Date: Fri, 20 Aug 2010 21:27:47 +0200

On Fri, Aug 20, 2010 at 3:43 PM, RUSS BRENNAN <address@hidden> wrote:
> Ok I looked into this a bit more and I think I understand the problem.
> Around line 57 of,  we have
> template <class T>
> bool
> intNDArray<T>::any_element_not_one_or_zero (void) const {
>   octave_idx_type nel = this->nelem ();
>   for (octave_idx_type i = 0; i < nel; i++)
>     {
>       T val = this->elem (i);
>       if (val != 0.0 && val != 1.0)
>         return true;
>     }
>   return false;
> }
> While the declaration of the != operator matches:
>             function template "bool octave_int_cmp_op::mop<xop,T>(T,
> double)"
>             function template "bool
> octave_int_cmp_op::mop<xop>(int64_t={long long}, double)"
> Which means that if in the case that T=int64_t, the two declarations are the
> same, which would obviously cause some compiler issues.

No, the compiler should resolve this, because the second overload is
more specialized. You need to read the C++ standard carefully to
understand. This has been seen before with gcc 3, see

I'm very surprised that your Intel C++ behaves differently from mine.
Forgive me the stupid question, but are you sure you properly upgraded
and are really calling 11.0 (try icpc --version)?

As another desperate attempt, you may try the development sources.

RNDr. Jaroslav Hajek, PhD
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic

reply via email to

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