struct Delegate1(T) {} struct Delegate2(T1, T2) {} template Signature(T) { alias Signature = typeof(*(T.init)); } alias del1_t = Delegate1!(Signature!(void function())); alias del2_t = Delegate2!(Signature!(int function(float, double)), Signature!(int function(float, double))); extern(C++) { void DelegateTest1(del1_t); void DelegateTest2(del2_t); } When compiling with the latest dmd from git head on windows this will output: Error: ICE: Unsupported type void() Error: ICE: Unsupported type int(float, double) Error: ICE: Unsupported type int(float, double) It should mangle the functions as: static assert(DelegateTest1.mangleof == "?DelegateTest1@@YAXU?$Delegate1@$$A6AXXZ@@@Z"); static assert(DelegateTest2.mangleof == "?DelegateTest2@@YAXU?$Delegate2@$$A6AHMN@Z$$A6AHMN@Z@@@Z");
https://github.com/D-Programming-Language/dmd/pull/4419
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/c4ef4296e217337de4d4137bae57bfda710454e2 Fixed bug 14195: Added C++ mangling for passing function signatures as template parameters. https://github.com/D-Programming-Language/dmd/commit/a68e1c1d4a08b029490c0c832920e0fdb12d7093 Merge pull request #4419 from Ingrater/fix14195 Fixed bug 14195: Added C++ mangling for passing function signatures
Commits pushed to https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/c4ef4296e217337de4d4137bae57bfda710454e2 Fixed bug 14195: Added C++ mangling for passing function signatures as template parameters. https://github.com/D-Programming-Language/dmd/commit/a68e1c1d4a08b029490c0c832920e0fdb12d7093 Merge pull request #4419 from Ingrater/fix14195
Commits pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/c4ef4296e217337de4d4137bae57bfda710454e2 Fixed bug 14195: Added C++ mangling for passing function signatures as template parameters. https://github.com/D-Programming-Language/dmd/commit/a68e1c1d4a08b029490c0c832920e0fdb12d7093 Merge pull request #4419 from Ingrater/fix14195
Commits pushed to dmd-cxx at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/c4ef4296e217337de4d4137bae57bfda710454e2 Fixed bug 14195: Added C++ mangling for passing function signatures as template parameters. https://github.com/dlang/dmd/commit/a68e1c1d4a08b029490c0c832920e0fdb12d7093 Merge pull request #4419 from Ingrater/fix14195