On Wednesday, 9 September 2015 at 09:08:28 UTC, Atila Neves wrote:
No, it doesn't. It needs to know what the compile-time
interface is, i.e. what it can do with that type. If the type
in question happens to be an InputRange, then the consumer
function would be:
void func(R)(R range) if(isInputRange!R) { ... }
instead of using a concrete type like this:
void func(MyType range) { ... }
That way you can change range types and `func` doesn't care.
Ah...makes sense. Thanks.
