Good project: stride() with constant stride value
Andrei Alexandrescu via Digitalmars-d
digitalmars-d at puremagic.com
Fri Mar 4 15:32:52 PST 2016
On 03/04/2016 04:32 PM, Jonathan M Davis wrote:
> IMHO, it would be cleaner to make them separate templates so that we
> don't have to give some special meaning to step == 0. And if it made
> sense for them to share their implementation, we could still have a
> helper template that did the step == 0 so that it was hidden from the user.
It's definitely simpler, easier to understand, and less code to
specialize for step = 0. I do a lot of that in std.allocator. -- Andrei
More information about the Digitalmars-d
mailing list