June 15, 2012 Re: Getting a range over a const Container | ||||
---|---|---|---|---|
| ||||
On Friday, June 15, 2012 09:14:45 Matthias Walter wrote: > Hi, > > I have a const std.container object (e.g., a const(Array!int)) of which > I'd like to have a range which can traverse that container having > read-only access. This does not seem to be possible with opSlice(). Is > there an alternative? opSlice is the only way to get a range out of Array. It looks like it lacks a const overload for opSlice - hence why it's not working for you. Feel free to open an enhancement request: http://d.puremagic.com/issues - Jonathan M Davis |
Copyright © 1999-2021 by the D Language Foundation