main.d(61): Error: temp_[i_] isn't mutable

Ali Çehreli acehreli at yahoo.com
Sun Jun 20 12:29:21 PDT 2010


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


More information about the Digitalmars-d mailing list