Why is std.algorithm.reduce impure?
H. S. Teoh
hsteoh at quickfur.ath.cx
Tue Mar 6 14:50:13 PST 2012
On Tue, Mar 06, 2012 at 11:42:00PM +0100, Adam D. Ruppe wrote:
> 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.
Oh? what's wrong with the const?
T
--
Don't modify spaghetti code unless you can eat the consequences.
More information about the Digitalmars-d-learn
mailing list