On Sunday, 4 December 2016 at 11:18:56 UTC, rumbu wrote:



Of course, the previous code will compile if we change the imports: import std.range.primitives: isInputRange, front, popFront, empty;

But that just prove the bad design of isInputRange which cannot be used all alone without the rest of array UFCSs imported.

isInputRange can be used alone just fine. But you aren't using it alone. You're using it together with the range primitives for arrays, but you are explicitly excluding them from the import by only selectively importing isInputRange. The import is working exactly as advertised. What is it about this case that makes you think it should behave differently?

Reply via email to