http://d.puremagic.com/issues/show_bug.cgi?id=10875
--- Comment #1 from Andrej Mitrovic <[email protected]> 2013-08-23 04:54:39 PDT --- (In reply to comment #0) > But since it's too late to change the return type, I propose we introduce an > enum version: Actually a reasonable alternative is to simply introduce the LinkageType enum which will have a string as its base type, so it can be used with the functionLinkage function: enum LinkageType : string { D = "D", C = "C", Windows = "Windows", Pascal = "Pascal", Cpp = "C++" } ----- import std.traits; extern(C) void func() { } void main() { enum linkage = functionLinkage!func; static if (linkage == LinkageType.C) { } else static if (linkage == LinkageType.D) { } } ----- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
