OONumerics User : |
From: Scott W. Coppen (scott_at_[hidden])
Date: 2005-03-05 11:50:35
Luis,
GCC 3.4 is very particular about calling methods in templated base
classes. This text was taken from GNU website:
- In a template definition, unqualified names will no longer find
members of a dependent base (as specified by [temp.dep]/3 in the C++
standard). For example,
template <typename T> struct B {
int m;
int n;
int f ();
int g ();
};
int n;
int g ();
template <typename T> struct C : B<T> {
void h ()
{
m = 0; // error
f (); // error
n = 0; // ::n is modified
g (); // ::g is called
}
};
It is difficult to tell if this is the issue you are having, but I bet
this is it. Just prefix the base class methods/members with
'this->'. Here is a helpful link if this does not fix it.
http://gcc.gnu.org/gcc-3.4/changes.html\
Regards,
On Friday 04 March 2005 11:19, chicomecoatl_at_[hidden] wrote:
> Hi everybody,
>
> I have updated my OS to Fedora Core 3, before I had Red Hat 9.0.
> In this new OS the gcc version is 3.4.2. Trying to compile a
> program in c++ with this new compiler version I got a lot of
> troubles. In my program I'm using templated clases, inheritance and
> static polymorfism (using Curiosly Recurring Template Pattern by
> Barton and Nackman). My main problem is with this latter feature,
> the compiler complains with the use of protected variables defined
> in base clases and used in derived clases (undefined variable it
> says).
>
> Do you know if this new version of gcc have some other problems?
> It is good idea to use gcc 3.4.2?
>
> Regards,
>
> Luis M. de la Cruz.
>
> -------------------------------------------------
> www.correo.unam.mx
> UNAMonos Comunicándonos
>
> _______________________________________________
> oon-list mailing list
> oon-list_at_[hidden]
> http://www.oonumerics.org/mailman/listinfo.cgi/oon-list
-- Scott W. Coppen President / Principal Engineer Blue Sail Software http://www.bluesailsoftware.com