why are opCmp and opEquals not pure.

Stefan Koch via Digitalmars-d digitalmars-d at puremagic.com
Thu Sep 17 13:24:35 PDT 2015


On Thursday, 17 September 2015 at 19:47:05 UTC, Timon Gehr wrote:

> I don't get this point. You don't need any annotations to write 
> ctfe-able code.

ctfe only works with pure functions.
annotating your functions with the pure attribute helps you to 
pinpoint problems early. without having to do the actual ctfe 
every time you compile... which might take a considerable amount 
of time :)



More information about the Digitalmars-d mailing list