On Tuesday, October 16, 2012 03:47:43 Jonathan M Davis wrote: > And if SortedRange is changed to provide access to its underlying range via > a member named source (it was recently suggested by Andrei that we should > standardize on doing that where appropriate), then it could become a one- > liner: > > auto result = sort(array(range)).source;
Actually, it looks like SortedRange already provides access to the range that it wraps via release. It returns the wrapped range and removes it from the SortedRange, which is actually better than source, because if SortedRange had source, then it would be possible to make it so that it wasn't sorted anymore. In any case, that means that the one line becomes auto result = sort(array(range)).release(); - Jonathan M Davis
