Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Computing return type for auto fold-expressions

> You have evaluations for the concrete arguments t1, t2, and t4. 
> I'll just refer to those as "t1", "t2", and "t4".
>
> The expression that gets instantiated is "t1 + t2 + t4". Since + is 
> left-associative, that's parenthesized as (t1 + t2) + t4.
> 
> So construct the following evaluation tree:
> 
>   EvalBinary
>     left: EvalBinary
>       left: t1
>       right: t2
>     right: t4

Thinking about this some more, just wanted to clarify that you
wouldn't be using the evaluations for the _arguments_ when
constructing the evaluation tree, since you'd probably be doing
it when instantiating the function body, at which time you don't
have the arguments yet. Rather, you'd be using the evaluations
for the _parameters_ of the instantiated function, as obtained
by ICPPFunction.getParameters().

However, the general idea of constructing an evaluation tree
is unchanged.

Hope that clarifies things further.

Regards,
Nate

Back to the top