Can pure functions accept const parameters or only invariant ?

Christopher Wright dhasenan at gmail.com
Mon Dec 29 13:58:17 PST 2008


mastrost wrote:
> So why is this code accepted by the compiler?

I'm not sure whether it's intentional, but a pure function is correct 
for mutable input as well as invariant input (barring threading issues), 
so this avoids code duplication.



More information about the Digitalmars-d mailing list