[phobos] phobos commit, revision 1687

dsource.org noreply at dsource.org
Wed Jun 23 01:53:45 PDT 2010


phobos commit, revision 1687


user: kyllingstad

msg:
Fixed unlisted bug: std.range.cycle() doesn't work with infinite ranges.

It was attempted to use the eponymous template trick inside a templated struct, like this:

  struct Cycle(R)
  {
      static if (isInfinite!R) alias R Cycle;
      ...
  }

but of course that doesn't work.  I've written the isInfinite case as a separate template instead, and added a unittest for it.

http://www.dsource.org/projects/phobos/changeset/1687



More information about the phobos mailing list