Mangling template
Wusiki jeronii
wusikijeronii at gmail.com
Thu May 6 22:03:36 UTC 2021
I wanna import a template function from .so lib. .so is written
in D.
```d
T abcd(T)(T a)
{
return a;
}
........
writeln(abcd!int.mangleof);
auto a = mangle!(typeof(abcd!int))("dll.abcd");
writeln(a);
```
Output:
_D3dll__T4abcdTiZQiFNaNbNiNfiZi
_D3dll4abcdFNaNbNiNfiZi
Demangled:
pure nothrow @nogc @safe int dll.abcd!(int).abcd(int)
pure nothrow @nogc @safe int dll.abcd(int)
How to pass the template part to the mangle template? Is it
possible at all to import a template function?
More information about the Digitalmars-d
mailing list