CTFE calling a template: Error: expression ... is not a valid template value argument

Timon Gehr timon.gehr at gmx.ch
Fri Sep 21 06:40:31 PDT 2012


On 09/21/2012 12:23 PM, Jens Mueller wrote:
> Timon Gehr wrote:
>...
>> The issue is that CTFE can only interpret functions that are fully
>> analyzed and therefore the analysis of foo depends circularly on
>> itself. The compiler should spit out an error that indicates the
>> issue.
>
> That is true. I will file such a diagnostics bug with low priority.
>
>> You could post an enhancement request to allow interpretation of
>> incompletely-analyzed functions, if you think it is of any use.
>
> I think it is.
> What do you think?
>

I think if it has an obvious interpretation (and in this case, it even
has an obvious analysis strategy) it should compile.


More information about the Digitalmars-d mailing list