[Issue 5076] std.algorithm.sorted / schwartzSorted

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Oct 19 09:43:15 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=5076



--- Comment #4 from Andrei Alexandrescu <andrei at metalanguage.com> 2010-10-19 09:42:37 PDT ---
(In reply to comment #3)
> (In reply to comment #2)
> > One issue is that there's no standardized "create a copy" function for ranges.
> 
> auto copy = array(input);
> 
> ?
> 
> Ideally you'd be able to specify what container you want to copy into, but that
> should do as a default.

array creates an array from anything. We should have a way to say "duplicate
and preserve type".

Probably the best idea is to define an optional property ".dup" for ranges.
Then arrays implement it automatically, and other ranges may define it as they
find fit.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list