On Monday, 17 August 2015 at 02:46:02 UTC, Freddy wrote:
I can't get pragma(mangle) to work on templates(or structs).
[...]
I don't know why but it looks like it only works on functions.
Even if a struct is not a template the custom symbol mangle won't
be handled:
---
import std.stdio;
pra
On Monday, 17 August 2015 at 03:14:16 UTC, Adam D. Ruppe wrote:
On Monday, 17 August 2015 at 02:46:02 UTC, Freddy wrote:
Mangling is done at a different level in the compiler than
aliases, so I don't think this is intended to work.
Is there any way I can mangle a template struct then?
On Monday, 17 August 2015 at 02:46:02 UTC, Freddy wrote:
pragma(mangle, "MyAlias") alias MyAlias = MyStruct!("a", "b",
"c" /+very long symbol bloating list+/ );
Mangling is done at a different level in the compiler than
aliases, so I don't think this is intended to work.
I can't get pragma(mangle) to work on templates(or structs).
import std.stdio;
struct MyStruct(T...)
{
int var;
void func()
{
writeln(var);
}
}
pragma(mangle, "MyAlias") alias MyAlias = MyStruct!("a", "b", "c"
/+very long symbol bloating list+/ );
void main()
{