This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Static data members in template declarations
On Nov 3, 1998, Mark Mitchell <mark@markmitchell.com> wrote:
> Yes, it is legal. But, it's in an entirely different class, as I'm
> sure you'll realize if you think about it carefully. It's quite a
> different thing to ask the compiler to keep around a slew of
> declarations and figure out whether they make any sense or not when
> things are instantiated vis a vis checking to see (in your case)
> whether the function *body* is legal at instantiation time.
It's not just a matter of thinking carefully about the problem. The
point is that, given the current implementation, it would be very hard
to save this information. However, if it had been implemented
differently, so that all decisions would be left for instantiation
time, it wouldn't in fact make much of a difference... So, I think
the decision has been made already :-)
Unless someone is willing to make such a big change, of course :-)
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:oliva@gnu.org mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil