help-octave
[Top][All Lists]
Advanced

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

Re: compiling with Sun Studio


From: Jim Langston
Subject: Re: compiling with Sun Studio
Date: Wed, 29 Aug 2007 10:17:00 -0400
User-agent: Thunderbird 1.5.0.8 (X11/20061204)

Hi John,

Don't know exactly what I need to do, I have looked at re-writing
the class, but before I do, I wanted to make sure no one has attempted
to get octave compiled with the Sun Studio compilers.

stlport4 tells the Sun compiler to use STLport's implementation of the
standard library, which seems to be ok with the cast as written.

I have tried this:

class pid_equal
{
public:

 pid_equal (pid_t v) : val (v) { }

 bool operator () (const octave_child& oc) const { return oc.pid == val; }
 bool operator () (const pid_equal& pid) const { return pid == val ; }

private:

 pid_t val;
};

but this generates:

"sighandlers.cc", line 892: Error: Overloading ambiguity between "operator==(const octave_int<long long>&, const octave_int<unsigned>&)" and "operator==(const octave_int<unsigned>&, const octave_int<char>&)".


Jim

/////////////////////////////


John W. Eaton wrote:
On 28-Aug-2007, Jim Langston wrote:

| Has anyone compiled 2.9.13 with Sun Studio compilers?
| | I'm down to one last error: | | It is in sighandlers.cc, and I get this error: | | "./base-list.h", line 45: Error: Cannot cast from pid_equal to | bool(*)(const octave_child&). | | | Which is associated with the class pid_equal. | | If I compile with -library=stlport4, then I can get this file to | compile, but because of the nature | of this option, all of octave must be compile with that option, and that | introduces all kinds of
| errors with the rest of the source code.
| | If looks like list::remove_if method requires exact type of the argument | - bool ( * ) ( const T & ) | which with the standard C lib is a problem. Can this class be | re-written, or is there another
| way to solve for it?

Precisely what change would make it work for the Sun compiler?

jwe


--
/////////////////////////////////////////////

Jim Langston
Sun Microsystems, Inc.

(877) 854-5583 (AccessLine)
AIM: jl9594
address@hidden



reply via email to

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