const debacle

Walter Bright newshound1 at digitalmars.com
Fri Mar 21 10:34:20 PDT 2008


Steven Schveighoffer wrote:
> How do you declare a function that takes an array, is not allowed to change 
> the array, but returns a slice into the argument array, and the return type 
> matches the argument type.


The way to do it is with a function template, parameterizing the type in 
question.



More information about the Digitalmars-d mailing list