|
|
|
|
|
by skocznymroczny
2445 days ago
|
|
auto natsBelow1000 = iota(1000); How do I pass this output to some other function without doing .array()? It's rare that you do all your processing in one method. Should I do this: void processFurther(T)(T t) if isInputRange!T { } ? I mean, it would probably work, but I don't like how the conditions are detached from type definitions :S |
|
> I don't like how the conditions are detached from type definitions
I can understand that; it's something that takes a bit of getting used to. See https://dlang.org/concepts.html for an explanation of template constraints and why they were designed this way.