The grammar defines StructTemplateDeclaration: struct Identifier ( TemplateParameterList ) StructBody However, in this form, optional template Constraint is missing. I think the grammar should be: StructTemplateDeclaration: struct Identifier ( TemplateParameterList ) Constraints_opt StructBody and the compiler (2.038) agrees. UnionTemplateDeclaration, InterfaceTemplateDeclaration, and ClassTemplateDeclaration should be similarly updated.
Changeset 1421
Fixed dmd 2.041