This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: document 3.4 changes
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: Gerald Pfeifer <pfeifer at dbai dot tuwien dot ac dot at>, gcc-patches at gcc dot gnu dot org, Mark Mitchell <mitchell at codesourcery dot com>
- Date: 13 Aug 2003 12:01:19 +0200
- Subject: Re: document 3.4 changes
- Organization: Integrable Solutions
- References: <3F3A09D8.5040108@codesourcery.com>
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