mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
13 lines
347 B
D
13 lines
347 B
D
template generateEmptyFunction(C, func...)
|
|
{
|
|
}
|
|
|
|
template isAbstractFunction(T...)
|
|
if (T.length == 1)
|
|
{
|
|
enum bool isAbstractFunction = __traits(isAbstractFunction, T[0]);
|
|
}
|
|
|
|
alias BlackHole(Base) = AutoImplement!(Base, generateEmptyFunction, isAbstractFunction);
|
|
|
|
class AutoImplement(Base, alias how, alias what = isAbstractFunction) : Base {}
|