`ref T` should be a type!!

Manu turkeyman at gmail.com
Thu Apr 4 08:33:57 UTC 2019


On Tue, Apr 2, 2019 at 4:10 AM Andrei Alexandrescu via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
>
> On 4/2/19 4:11 AM, Walter Bright wrote:
> > On 4/1/2019 5:55 PM, Atila Neves wrote:
> >> Factually incorrect.
> >
> > I suspect Rubn has confused the syntactical conflation of arrays with
> > pointers in C, and the implicit coercion of arrays to pointers, as them
> > being the same. They simply aren't the same, as they are semantically
> > separated by one level of indirection.
>
> You forgot to mention that top-level "const" is ignored in function
> parameters (for the signature and mangling but not the implementation).

Actually, it's sadly not ignored, and MSVC mangles it! It's been a
massive PITA when writing some of the STL bindings in druntime!
I've had to manually build mangled function names to extern, because I
can't express it in D >_<

https://github.com/dlang/druntime/blob/master/src/core/stdcpp/allocator.d#L50
 <- you're loving it!


More information about the Digitalmars-d mailing list