The following code causes an assertion failure in dmd 2.066.1:
import std.typecons : BlackHole;
extern(C++) interface Inter
{
void func();
}
BlackHole!Inter var;
The error output is:
/usr/include/dlang/dmd/std/typecons.d(1980): Error: template instance std.typecons.AutoImplement!(Inter, generateEmptyFunction, isAbstractFunction) ICE: generateEmptyFunction(C, func...) is unsupported parameter for C++ template
dmd: cppmangle.c:218: void CppMangleVisitor::source_name(Dsymbol*): Assertion `0' failed.
Comment #1 by ibuclaw — 2018-10-10T23:08:14Z
Error is now:
Internal Compiler Error: C++ generateEmptyFunction(C, func...) template alias parameter is not supported
The compiler exits gracefully, but the diagnostic means it should have been caught earlier.
Comment #2 by robert.schadek — 2024-12-13T18:39:06Z