`ref T` should be a type!!
Rubn
where at is.this
Wed Apr 3 20:11:02 UTC 2019
On Wednesday, 3 April 2019 at 20:10:08 UTC, Rubn wrote:
> On Tuesday, 2 April 2019 at 20:43:14 UTC, Walter Bright wrote:
>> On 4/2/2019 4:05 AM, Andrei Alexandrescu wrote:
>>> You forgot to mention that top-level "const" is ignored in
>>> function parameters (for the signature and mangling but not
>>> the implementation).
>>
>> Curiously, it is present in the name mangling for dmc++ and
>> dmd (for extern(D)), but it should be fixed for dmd.
>>
>> https://issues.dlang.org/show_bug.cgi?id=19785
>>
>>
>>> Now the fact that "42" is just ignored in the declaration
>>> below is indistinguishable from conspiracy:
>>>
>>> void fun(int a[42]);
>>
>> Ironically, it is not ignored in the C++ mangling if it's a
>> ref to int[42].
>
> Not ironically, because you can't have a reference to a pointer
> :). It makes sense if you understand that:
>
> void foo( int a[] );
>
> Is not a parameter to an array. After your whole spiel about
> ferraris, engines, and how their users won't see the internal
> workings of the engine. I'd have hoped better from you than you
> pointing at the top level fluffy user-friendly error message
> and saying LOOK LOOK it says array so it must be an array!
A pointer to a reference*.
More information about the Digitalmars-d
mailing list