`ref T` should be a type!!

Walter Bright newshound2 at digitalmars.com
Mon Apr 1 01:18:44 UTC 2019


On 3/31/2019 5:35 PM, Rubn wrote:
> you can literally use it everywhere else you can use a type.

No, you can't. An array of refs won't compile, either.

   void test(int& a[]); // error

A C++ ref can only appear at the top of a type AST, which is unlike any other 
type. Which exactly matches the only place a storage class can be!



More information about the Digitalmars-d mailing list