`ref T` should be a type!!

Walter Bright newshound2 at digitalmars.com
Mon Apr 1 20:37:03 UTC 2019


On 4/1/2019 6:09 AM, Dein wrote:
> Not sure if you are trying to just deceive me with some syntax sugar in 
> C++ or what.

You can try it yourself:

----------
g++ -c test.cpp
test.cpp:1:17: error: cannot declare pointer to int&
  void test(int&* p);
                  ^
----------
  g++ -c test.cpp
test.cpp:1:18: error: declaration of p as array of references
  void test(int& p[]);
                   ^
----------


More information about the Digitalmars-d mailing list