DIP 1021--Argument Ownership and Function Calls--Final Review

Exil Exil at gmall.com
Tue Sep 17 17:18:15 UTC 2019


Another issue:

     @safe:


     void foo(ref int, ref int) {
     }

     void test() {
         int b;

         int* a = &b;
         int* c = &b;

         // foo( b, b); // error

         foo( *a, *c); // but this is ok
     }


More information about the Digitalmars-d mailing list