On 06/20/2010 02:29 PM, Ali Çehreli wrote:
Andrei Alexandrescu wrote:
> IMHO it's more general if the regexp took the string type as a
> parameter. This is because later that is easier generalizable to
> accepting a range that's different from an array.
Agreed.
Given T which may be an immutable type, what is the cleanest way of
creating a mutable copy of that type? typeof(array.dup) works on arrays
but what if T is a value type or any type where .dup doesn't exist?
Ali
std.conv.to should work with most sensible combinations.
Andrei