This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Templates with incomplete types


On Jul 8, 2004, at 1:51 PM, Gabriel Dos Reis wrote:

Matt Austern:

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?

--Matt


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]