[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: compile error on SGI using egcs 1.1.b
From: |
John W. Eaton |
Subject: |
Re: compile error on SGI using egcs 1.1.b |
Date: |
Tue, 12 Jan 1999 10:16:07 -0600 (CST) |
On 12-Jan-1999, Brian Tyrrell <address@hidden> wrote:
| I had a similar problem. Take a look at the help-octave and bug-octave
| archives for ~Dec 15.
|
| What finally worked for me was using Mumit Khan's patch in 1998/270. Some
| of the patch appeared to have already been implemented, but part of it was
| not.
I assume you mean that the template instantiations are no longer
implemented as Mumit suggested. That's because the original code was
like this:
template <class T1, class T2>
bool
mx_leftdiv_conform (T1 a, T2 b)
{
...
}
template bool mx_leftdiv_conform (const Matrix&, const Matrix&);
which was apparently incorrect. Mumit suggested changing the
instantiation to be
template bool mx_leftdiv_conform (Matrix, Matrix);
which worked for egcs, but I really wanted the arguments to
mx_leftdiv_conform to be const reference objects. So I modified the
template definition to be
template <class T1, class T2>
bool
mx_leftdiv_conform (const T1& a, const T2& b)
{
...
}
and made the template instantiation look like this:
template bool mx_leftdiv_conform (const Matrix&, const Matrix&);
which is correct as far as I can tell. It works for me with egcs
1.1.1, gcc 2.8.1, and gcc 2.7.2.
If it fails for others, can someone please explain what is going on,
and what the correct fix is?
Thanks,
jwe
Re: compile error on SGI using egcs 1.1.b,
John W. Eaton <=