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

James Blachly james.blachly at gmail.com
Tue Oct 20 01:32:23 UTC 2020


On Thursday, 15 October 2020 at 14:05:20 UTC, Andrei Alexandrescu 
wrote:
> 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.
>


This would solve a problem I had whereby we had several compile 
time backends available and wanted to do

version(A || B)


More information about the Digitalmars-d mailing list