std.v2020.algorithm etc[ WAS: Is run.d going to be expand for runtime and the phobos library?]
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Tue Jun 23 16:22:39 UTC 2020
On 6/23/20 11:50 AM, Andrei Alexandrescu wrote:
>> E.g. the following code will only instantiate a single template:
>> ```
>> void fun2(T)(const T[] a) { pragma(msg, T.stringof); }
>>
>> void main() {
>> immutable(int[]) a;
>> fun2(a);
>> int[] b;
>> fun2(b);
>> }
>> ```
>
> This example is actually not illustrative. The first call involves a
> conversion from immutable(int[]) to immutable(int)[].
Oops, I meant from immutable(int[]) to const(int[]).
More information about the Digitalmars-d
mailing list