Comment #0 by stanislav.blinov — 2021-10-28T05:14:26Z
import std.range;
void main() {
struct S {
// comment this ctor to make the issue disappear
this(return ref scope const S) {}
void remainNestedEvenIfCtorAboveIsCommented() {}
}
static assert(__traits(isNested, S)); // passes
static assert(isInputRange!(S[])); // fails
}
---
Removing the copy ctor makes the check pass, so this might be a dmd issue?..
It would seem that the problematic check in isInputRange is the
is(typeof((return ref R r) => r.front))
which triggers the infamous "cannot access frame pointer", but not when the copy ctor is not present.
Comment #1 by edi33416 — 2021-11-18T17:16:59Z
IMHO, this isn't a Phobos bug.
As you've already put it, it's the infamous "cannot access frame pointer" issue.
Moving it to dmd.
Comment #2 by robert.schadek — 2024-12-13T19:18:56Z