Should `pragma(inline, expression)` be allowed ?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Thu Oct 15 14:05:20 UTC 2020


On 10/15/20 9:23 AM, Basile B. wrote:
> On Thursday, 15 October 2020 at 09:14:05 UTC, Per Nordlöw wrote:
>> On Wednesday, 14 October 2020 at 17:22:40 UTC, Basile B. wrote:
>>>> version(D_Coverage)
>>>>     enum do_inline = true;
>>>> else
>>>>     enum do_inline = false;
>>
>> This has been discussed but Walter is against it if I remember correctly.
> 
> That's exactly why I ask here be fore opening an issue

I think this falls in the "gratuitous limitations" category and should 
be fixed. Any place where a compile-time Boolean fits, a 
compile-time-computable expression should fit. Same about numbers, 
strings etc.

I'm glad that the related issue with `align(number)` has been fixed. Up 
until recently only literals were allowed.




More information about the Digitalmars-d mailing list