`ref T` should be a type!!
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Tue Apr 2 00:13:13 UTC 2019
On 4/1/19 7:43 PM, Rubn wrote:
> On Monday, 1 April 2019 at 20:37:03 UTC, Walter Bright wrote:
>> 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[]);
>> ^
>> ----------
>
> You can try it yourself:
>
> void foo(int* const p) {}
> void foo(int p[]) {}
> -----------------------------------------------
> test.cpp:3:6: error: redefinition of 'foo'
> void foo(int p[]) {}
> ^
> test.cpp:2:6: note: previous definition is here
> void foo(int* const p) {}
> ^
> 1 error generated.
The fact that we have somebody teaching Walter Bright the C language to
is supremely ironic in wake of the recent discussions.
More information about the Digitalmars-d
mailing list