D-Programming-Language/phobos — pull request #1895 by monarchdodra (2014-02-01 14:47:03+00:00)
Title: Fix issue 12007 - cartesianProduct does'nt work with ranges of immutable...

...s

The fix consists in making Repeat!T assignable, even if T itself is not. This is important to be able to store copies of a saved range (the `save` trait only checks for copy constructible).

For the case of const/immutable classes, I used a `Rebindable`. This is *slightly* sub-optimal, as it adds a dependency on `std.typecons`, and makes gives `Repeat` an elaborate assign. That said, it's a trivial 1 line fix, so totally worth it.