Creating a growable binary heap or priority queue using Phobos?
Jonathan M Davis
jmdavisProg at gmx.com
Sun Nov 13 13:22:01 PST 2011
On Sunday, November 13, 2011 23:12:30 SimonM wrote:
> Okay, I might on the wrong track, but part of the reason that the
> isRandomAccessRange template fails might be because, while Array!(T)
> internally uses a Range, it doesn't itself actually provide the save()
> and popBack() functions that a Range does?
A std.container.Array is not a range. It's a container. Yes, it uses an arary
internally, which _ is_ a range, but it controls that memory and doesn't given
out slices of that internal array. If you want a range over an Array, then
slice it.
- Jonathan M Davis
More information about the Digitalmars-d-learn
mailing list