[phobos] [D-Programming-Language/phobos] f8f2a8: Revert "Fix `std.range.takeExactly` trait to rejec...

GitHub noreply at github.com
Mon Dec 17 21:38:30 PST 2012


  Branch: refs/heads/master
  Home:   https://github.com/D-Programming-Language/phobos
  Commit: f8f2a81a604204912192f570847933c0cff97845
      https://github.com/D-Programming-Language/phobos/commit/f8f2a81a604204912192f570847933c0cff97845
  Author: jmdavis <jmdavisProg at gmx.com>
  Date:   2012-12-16 (Sun, 16 Dec 2012)

  Changed paths:
    M std/range.d

  Log Message:
  -----------
  Revert "Fix `std.range.takeExactly` trait to reject slices without length."

This reverts commit 6a0b6c4deebe48d0e2650598bdf58ffa93cb66b5.


  Commit: 24a696a2b275608622f5d0aa375e1f358c51cca4
      https://github.com/D-Programming-Language/phobos/commit/24a696a2b275608622f5d0aa375e1f358c51cca4
  Author: jmdavis <jmdavisProg at gmx.com>
  Date:   2012-12-16 (Sun, 16 Dec 2012)

  Changed paths:
    M std/range.d

  Log Message:
  -----------
  Adjustments to take and takeExactly.

takeExactly now returns the same type as take where possible, and
neither take nor takeExactly check hasSlicing for infinite ranges (since
infinite ranges will soon be required to use them for slicing, and that
creates a circular dependency among those 3 templates


  Commit: 7d5d9fb1c0a28ecd5d87779b41497ee403f985c8
      https://github.com/D-Programming-Language/phobos/commit/7d5d9fb1c0a28ecd5d87779b41497ee403f985c8
  Author: jmdavis <jmdavisProg at gmx.com>
  Date:   2012-12-16 (Sun, 16 Dec 2012)

  Changed paths:
    M std/algorithm.d

  Log Message:
  -----------
  Some whitespace cleanup.


  Commit: 0d9b31b594e18309cc89e66e94fa501bd9824896
      https://github.com/D-Programming-Language/phobos/commit/0d9b31b594e18309cc89e66e94fa501bd9824896
  Author: jmdavis <jmdavisProg at gmx.com>
  Date:   2012-12-16 (Sun, 16 Dec 2012)

  Changed paths:
    M std/range.d

  Log Message:
  -----------
  Adustments to hasSlicing.

Now, it enforces that opSlice returns a range which can be assigned to
the original range type (so that it can be assigned to the original
range as long as the original range isn't const) as long as it's finite,
and it enforces that opSlice's result is the result of take when the
range is infinite.


  Commit: 57ddea7cf2bd3c3b04ae97203f1666c434406d81
      https://github.com/D-Programming-Language/phobos/commit/57ddea7cf2bd3c3b04ae97203f1666c434406d81
  Author: jmdavis <jmdavisProg at gmx.com>
  Date:   2012-12-16 (Sun, 16 Dec 2012)

  Changed paths:
    M std/algorithm.d

  Log Message:
  -----------
  Fix to Map caused by changes to hasSlicing.

import std.algorithm;
import std.range;

void main()
{
    auto N2 = sequence!"n"(cast(size_t)1).map!"a";
}

ceased to compile, because Map's opSlice won't work anymore over
infinite ranges, because the result can't be reassigned to the original.


  Commit: a0b82a53b89c69102a0ab0c2e16cbb013550c723
      https://github.com/D-Programming-Language/phobos/commit/a0b82a53b89c69102a0ab0c2e16cbb013550c723
  Author: jmdavis <jmdavisProg at gmx.com>
  Date:   2012-12-16 (Sun, 16 Dec 2012)

  Changed paths:
    M std/range.d

  Log Message:
  -----------
  Add some requirements for opDollar to hasSlicing.

Ideally, opDollar would be outright required for any range with slicing,
but unless/until it's changed so that length automatically aliases to
opDollar when opDollar isn't defined (issue# 7177), that's probably not
a reasonable requirement to make.


  Commit: 6022082b29f670095fb082102420c7b331cb7d14
      https://github.com/D-Programming-Language/phobos/commit/6022082b29f670095fb082102420c7b331cb7d14
  Author: jmdavis <jmdavisProg at gmx.com>
  Date:   2012-12-16 (Sun, 16 Dec 2012)

  Changed paths:
    M std/range.d

  Log Message:
  -----------
  Further strengthen hasSlicing.

The extra requirements are not currently enabled because of bug# 8847,
but they're now there, and they're listed as their in the documentation
so that no one will think that they're not supposed to apply.


  Commit: a916ad8afb167d8cd068bc0169f94a29a43d38de
      https://github.com/D-Programming-Language/phobos/commit/a916ad8afb167d8cd068bc0169f94a29a43d38de
  Author: jmdavis <jmdavisProg at gmx.com>
  Date:   2012-12-16 (Sun, 16 Dec 2012)

  Changed paths:
    M std/range.d

  Log Message:
  -----------
  Strengthened isRandomAccess with regards to $.

It now requires that indexing with $ result in the same type as front if
r[$] works, and if that works, and the range isn't infinite, r[$ - 1]
must be the same type as front. Ideally, we'd require that r[$] work
regardless, but without enhancement #7177 being implemented, that would
likely break too much code, as opDollar was only recently fixed and
probably isn't used much.


  Commit: 68db081f1e059d1e48c16ad46ac7402aa1d300ea
      https://github.com/D-Programming-Language/phobos/commit/68db081f1e059d1e48c16ad46ac7402aa1d300ea
  Author: jmdavis <jmdavisProg at gmx.com>
  Date:   2012-12-16 (Sun, 16 Dec 2012)

  Changed paths:
    M std/range.d

  Log Message:
  -----------
  Removed incorrect @property attributes in std.range.

They were removed previously but reintroduced due to a bad rebase, so
I'm removing them again here.


  Commit: af12683895b7dd1519be27cdcfe1dadb4f9c3992
      https://github.com/D-Programming-Language/phobos/commit/af12683895b7dd1519be27cdcfe1dadb4f9c3992
  Author: Andrei Alexandrescu <andrei at erdani.com>
  Date:   2012-12-17 (Mon, 17 Dec 2012)

  Changed paths:
    M std/algorithm.d
    M std/range.d

  Log Message:
  -----------
  Merge pull request #854 from jmdavis/hasSlicing

Improvements to hasSlicing


Compare: https://github.com/D-Programming-Language/phobos/compare/3a0f062bc264...af12683895b7


More information about the phobos mailing list