http://www.d-programming-language.org/mixin.htmlの例を以下に示します。
template GenStruct(char[] Name, char[] M1) {
const char[] GenStruct = "struct " ~ Name ~ "{ int " ~ M1 ~ "; }";
} mixin(GenStruct!("Foo", "bar"));
「生成するもの:」(サイトによると):
struct Foo { int bar; }
エラーが発生します:
Error: template instance GenStruct!("Foo","bar") GenStruct!("Foo","bar") does not match template declaration GenStruct(char[] Name,char[] M1)
それは私のものですか、それとも彼らのバグですか?