Skip to content

LightScopeOf Doesn't See Through Layers of Templates #86

@jmh530

Description

@jmh530

I have a referenced-counted stairs object that I want to pass to another function. It requires calling lightScope on it to strip the RC context. I think the way to do that is to make sure that LightScopeOf works for it, but it looks like when the iterator is a StairsIterator, then LightScopeOf just returns the same type. Ideally it should just be a simple fix to adjust how LightScopeOf works to get working.

unittest {
    import mir.ndslice.iterator: StairsIterator;
    import mir.qualifier: LightScopeOf;
    import mir.rc: RCI;

    static assert(is(LightScopeOf!(StairsIterator!(RCI!double, "+")) == StairsIterator!(RCI!double, "+"))); //passes but shouldn't (ideally)
    static assert(is(LightScopeOf!(StairsIterator!(RCI!double, "+")) == StairsIterator!(double, "+"))); //fails, but should pass (ideally)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions