[Issue 19544] Can't call inputRangeObject on ranges not supported by moveFront

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Sep 30 00:35:18 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=19544

--- Comment #3 from Dlang Bot <dlang-bot at dlang.rocks> ---
@pbackus created dlang/phobos pull request #8256 "Issue 19544 - Can't call
inputRangeObject on ranges not supported by …" mentioning this issue:

- Issue 19544 - Can't call inputRangeObject on ranges not supported by
moveFront

  The range algorithms moveFront, moveBack, and moveAt do not accept all
  valid input ranges, bidirectional ranges, and random-access ranges,
  respectively. Their inclusion as methods of the InputRange,
  BidirectionalRange, and RandomAccessFinite interfaces previously caused
  InputRangeObject, which implements those interfaces, to fail to compile
  when instantiated with certain valid input, bidirectional, and
  random-access ranges.

  These methods should not have been included in their respective
  interfaces to begin with, but removing them now would break existing
  code. Instead, as a workaround, InputRangeObject now implements these
  methods by throwing an exception if the wrapped range does not support
  them.

https://github.com/dlang/phobos/pull/8256

--


More information about the Digitalmars-d-bugs mailing list