Why is std.algorithm.reduce impure?

Adam D. Ruppe destructionator at gmail.com
Tue Mar 6 14:42:00 PST 2012


On Tuesday, 6 March 2012 at 22:39:20 UTC, H. S. Teoh wrote:
> Why is std.algorithm.reduce not marked pure?

It doesn't have to be - templates are inferred to be
pure or not.

If you take the const off that signature, your example
works in today's dmd.


More information about the Digitalmars-d-learn mailing list