On 6/20/12 11:03 AM, Jonathan M Davis wrote:
On Wednesday, June 20, 2012 13:38:31 Timon Gehr wrote:
Escape the payload anyway and document that the range is invalid after
the container has been destroyed.
That's a given anyway. Ranges from containers are _always_ invalid after the
container that they come from is gone. They can also become invalid for a
variety of operations on the container. That's why we have the stableX
functions. So, there may be serious problems with a range over a const Array,
but the invalidation of its range when the Array goes away is not one of them.
Actually supporting orphan ranges has been discussed and may make sense.
Andrei