How can I express the type of a function in D?

Sobaya sobaya007 at gmail.com
Wed Jan 30 06:57:40 UTC 2019


On Wednesday, 30 January 2019 at 06:02:02 UTC, FrankLike wrote:
> On Wednesday, 30 January 2019 at 05:40:50 UTC, FrankLike wrote:
>> On Wednesday, 30 January 2019 at 05:14:20 UTC, Sobaya wrote:
>>> [...]
>
> import std.stdio;
> import std.process:executeShell;
> import core.demangle;
>
> void main()
> {	
> 	assert(mangle!(int function(int))("a.b") == "_D1a1bPFiZi");
> 	executeShell("pause");
> }
>> ////////////////CODE END//////////
>> Yes,"_D1a1bPFiZi",which includes "P".

I want a mangled function name without "P", not one with "P".


More information about the Digitalmars-d-learn mailing list