[cfe-dev] Adding template default parameter with as typed explicit parameter

Douglas Gregor dgregor at apple.com
Fri Sep 28 08:19:23 PDT 2012


On Sep 28, 2012, at 1:49 AM, Philippe Canal <pcanal at fnal.gov> wrote:

> On 9/28/12 1:07 AM, Eli Friedman wrote:
>> Hmm... yes, that's possible, but I'm not sure we'd want to pay the
>> price in memory usage/compile-time for normal compiles (IIRC, the
>> relevant code is in semantic analysis, so we would have to pre-compute
>> it then).
> Could we enable this feature only when explicitly requested, for
> example via a language option?  (Especially since - as you pointed out -
> the correct values can only be calculated in-flight during the semantic
> analysis).


We strongly prefer not to use language options to make such behavior optional. We instead try to either make it so cheap to compute that we always have it, or make it easy to lazily compute it.

	- Doug



More information about the cfe-dev mailing list