You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there is no way to get the name of the alias for a symbol type.
For example the following:
===
void main()
{
import std.traits;
size_t s;
pragma(msg, typeof(s).stringof);
pragma(msg, mangledName!(typeof(s)));
pragma(msg, mangledName!s);
}
===
Prints
---
ulong
m
_D9onlineapp4mainFZ1sm
---
For code generation porpoises (eg. generate C wrapper code) there is no way to get the type of `s` as `size_t` because `size_t` is an alias.
A new trait, `__traits(aliasName, symbol)`, could be used to retrieve the alias name for a symbol type.
This trait will return the name of the concrete type if the symbol type is not an alias.
The text was updated successfully, but these errors were encountered:
Radu Racariu (@rracariu) reported this on 2018-06-26T14:13:35Z
Transferred from https://issues.dlang.org/show_bug.cgi?id=19029
Description
The text was updated successfully, but these errors were encountered: