document 3.4 changes
Gabriel Dos Reis
gdr@integrable-solutions.net
Wed Aug 13 10:02:00 GMT 2003
Nathan Sidwell <nathan@codesourcery.com> writes:
[...]
| + template <typename T> struct C : B<T> {
| + void g ()
| + {
| + m = 0; // error
| + f (); // error
| + n = 0; // ::n is modified
| + g (); // ::g is called
| + }
| + };</pre>
| + You must explicitly qualify the name. Here is the corrected
| + definition of <code>C<T>::g</code>,
| + <pre>
| + template <typename T> void C<T>::g ()
| + {
| + this->m = 0;
| + this->f ();
| + this->n = 0
| + this->g ();
| + }</pre>
This hunk is misleading. Explicilty "qualifying names" means put a
nested-name-specifier in front of the identifier, i.e. something like
C::m, C::g, which obviously is not what is descrived above.
How about
You would need to make the names dependent by putting "this->" in
front of them.
Our documentation already contains wording about dependent names and such.
-- Gaby
More information about the Gcc-patches
mailing list