Proposal: Relax rules for 'pure'
Don
nospam at nospam.com
Wed Sep 22 12:02:18 PDT 2010
klickverbot wrote:
> On 9/22/10 7:10 PM, Steven Schveighoffer wrote:
>> But the compiler will be able to tell. I think adding a
>> __traits(isStronglyPure, symbol) will be good for those rare occasions
>> where you really want to ensure purity.
>>
>> static assert(__traits(isStronglyPure, foo));
>>
>> -Steve
>
> Shouldn't it be possible to implement that in a library template, not
> requiring any additions to the compiler at all?
Yes. In fact, it's easy.
More information about the Digitalmars-d
mailing list