This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: The future C++ template model in gcc
- To: gdr at codesourcery dot com, schintke at zib dot de
- Subject: Re: The future C++ template model in gcc
- From: mike stump <mrs at windriver dot com>
- Date: Mon, 30 Jul 2001 09:14:33 -0700 (PDT)
- Cc: gcc at gcc dot gnu dot org
> To: Florian Schintke <schintke@zib.de>
> Cc: Gabriel Dos Reis <gdr@codesourcery.com>, gcc@gcc.gnu.org
> From: Gabriel Dos Reis <gdr@codesourcery.com>
> Date: 30 Jul 2001 11:16:31 +0200
> The question is how to you determine the set of "all necessary
> instantiations"?
Easy, the one that can provide semantics for all possible template
parameters.
> | My idea is to not instantiate the templates,
> | but to provide a generic template implementation that works
> | for all template arguments.
> How, given a template, do you construct "a generic template
> implementation that works for all template arguments"?
Easy, you defer til runtime all the decisions that would have impacted
the generated code that would have been made at compile time. The
list of decisions that are made at compile time can readily be read by
reading the compiler source. :-)