alias symbol name
Radu
void at null.pt
Tue Jun 26 13:51:21 UTC 2018
On Tuesday, 26 June 2018 at 12:19:16 UTC, Jonathan M Davis wrote:
> On Tuesday, June 26, 2018 11:28:11 Radu via Digitalmars-d-learn
> wrote:
>> > [...]
>>
>> Ha! :) yeah I was pretty sure this will not work.
>>
>> I'm looking to generate some custom wrappers and knowing when
>> something is really `size_t` is important, I have a backup
>> plan, but having a compiler trait to get an alias symbol name
>> would be great. Maybe this is worthy an enhancement request?
>
> Feel free. I have no idea how likely it is to ever be
> implemented.
>
> However, if your custom wrappers are generated at compilation
> time rather than generated as files to be compiled later, then
> it's unnecessary to know whether an alias was used, since then
> you'd just use the exact type being used for that particular
> compilation.
>
> - Jonathan M Davis
Code generation is at compile time and the target is C code, so
it is important to keep the type `size_t` rather than `uint` or
`ulong` for obvious reasons.
I will submit and issue for a new trait.
More information about the Digitalmars-d-learn
mailing list