What should array() return for const/immutable ElementTypes?
bearophile
bearophileHUGS at lycos.com
Sat May 5 10:48:32 PDT 2012
David Nadlinger:
> Should it always return an array of (head-)mutable elements
> (since it allocates a copy anyway), or should it preserve
> constness of the element type?
Ideally the most useful result is a mutable one that is
implicitly castable to immutable if the mapping function is pure.
But I don't know if this is always possible.
Bye,
bearophile
More information about the Digitalmars-d
mailing list