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]

Re: The future C++ template model in gcc


> 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.  :-)


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