On Tue, 1 Mar 2005, Johan Bergman (KI/EAB) wrote:
> Here is a unified diff for the proposed change (I think).
Johan, Giovanni, I just noticed that this one apparently feel trough
the cracks?
I had assumed that Giovanni would just go ahead an apply it since he's
an expert in that area and the patch even was rather short, but I do not
see it in CVS, so I just committed it.
Gerald
Tweak description of alternative solution for name lookup problem.
By Johan Bergman (KI/EAB) <[EMAIL PROTECTED]>
--- changes.htm% 2005-02-28 21:46:56.000000000 +0100
+++ changes.htm 2005-02-28 21:46:56.000000000 +0100
@@ -429,10 +429,10 @@
template <typename T> struct C : B<T> {
void h ()
{
- m = 0; // error
- f (); // error
- n = 0; // ::n is modified
- g (); // ::g is called
+ m = 0; // error
+ f (); // error
+ n = 0; // ::n is modified
+ g (); // ::g is called
}
};</pre>
<p>You must make the names dependent, e.g. by prefixing them
@@ -446,7 +446,8 @@
this->n = 0
this->g ();
}</pre>
- <p>As an alternative solution, you may use <code>using</code>
+ <p>As an alternative solution (unfortunately not backwards
+ compatible with GCC 3.3), you may use <code>using</code>
declarations instead of <code>this-></code>:</p>
<pre>
template <typename T> struct C : B<T> {
@@ -456,10 +457,10 @@
using B<T>::g;
void h ()
{
- m = 0;
- f ();
- n = 0;
- g ();
+ m = 0;
+ f ();
+ n = 0;
+ g ();
}
};</pre></li>