This is the mail archive of the
mailing list for the GCC project.
Re: Templates with incomplete types
- From: Matt Austern <austern at apple dot com>
- To: gdr at acm dot org
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 8 Jul 2004 14:08:34 -0700
- Subject: Re: Templates with incomplete types
- References: <0C515E34-D10D-11D8-B250-000A95AA5E5E@apple.com> <"32992.::ffff:220.127.116.11.1089319919.squirrel"@webmail.nerim.net>
On Jul 8, 2004, at 1:51 PM, Gabriel Dos Reis wrote:
On the other hand, in 3.3 we used to accept this code, and I suspect a
number of other compilers did too. (That's what'll happen if you do
all name lookup at the point of instantiation.) I suspect there's
still code out there that relies on the old behavior. Should we
provide a switch that'll get the old behavior back?
I suspect the real question is what do we do with respect to
old-behaviour, i.e. only one-phase lookup at instantiation time.
I suspect that your example is just the nose of the camel :-)
If you put in codes to support your example, people would
have more trouble understanding why you require two-phase
name lookup in other similar cases.
That's quite possibly true. And my question wasn't rhetorical!
Perhaps the answer to my question really is "no". (I'm not fond
of switches to support old nonconforming behavior either.)
Perhaps the real question is: should there be a mode where
we do one-phase name lookup and do all name lookup at the
point of instantiation?