import std.range;
unittest {
static struct R
{
int front() => 0;
void popFront() {}
bool empty() => false;
}
R range;
auto r = RefRange!R(&range);
}
src/phobos/std/range/package.d(12407): Error: mutable method `onlineapp.__unittest_L3_C1.R.front` is not callable using a `const` object
app.d(6): Consider adding `const` or `inout` here
src/phobos/std/range/package.d(12433): Error: mutable method `onlineapp.__unittest_L3_C1.R.empty` is not callable using a `const` object
app.d(8): Consider adding `const` or `inout` here
app.d(11): Error: template instance `std.range.RefRange!(R)` error instantiating
Comment #1 by dlang-bot — 2024-10-09T12:30:19Z
@Ogi-kun updated dlang/phobos pull request #9056 "Fix issue 24801 - `RefRange` doesn’t work if range primitives are not `const`" fixing this issue:
- Fix Bugzilla issue 24801 - `RefRange` doesn’t work if range primitives are not `const`
https://github.com/dlang/phobos/pull/9056
Comment #2 by dlang-bot — 2024-10-18T02:59:38Z
dlang/phobos pull request #9056 "Fix issue 24801 - `RefRange` doesn’t work if range primitives are not `const`" was merged into master:
- ac88afce2c6f14f93d39559ae6e2367824fe8ef7 by Georgy Markov:
Fix Bugzilla issue 24801 - `RefRange` doesn’t work if range primitives are not `const`
https://github.com/dlang/phobos/pull/9056
Comment #3 by robert.schadek — 2024-12-01T16:43:01Z