Initialising Context Pointer during Semantic Analysis

Teodor Dutu teodor.dutu at gmail.com
Mon Nov 28 17:33:34 UTC 2022


On Monday, 28 November 2022 at 17:25:06 UTC, Teodor Dutu wrote:
>
> I don't understand why passing `context` to `make()` is better 
> than passing it to `_d_newitemT()` directly. I would still use 
> `context` to copy the context pointer, so wouldn't it be the 
> same?

In addition, in my case, isn't the `alias dummy` parameter the 
same as a `const ref T dummy` parameter? Does the alias somehow 
allow me to get the context pointer more elegantly than copying 
it from `dummy`? If not, then I would still need to create 
`dummy`, pass it as a `ref` to a template (either the local one 
or the hook itself) and then copy the context pointer from it.



More information about the Digitalmars-d mailing list