https://issues.dlang.org/show_bug.cgi?id=18028
Issue ID: 18028 Summary: Allow Unnecessary Template Instantiation To Be Dropped Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: j...@jackstouffer.com With function templates, if the template argument(s) have default parameters, the template parentheses doesn't have to be specified: ``` void func(T = float)() { } void main() { func(); } ``` However, this is not the case for structs: ``` struct Test(T = float) { T a; } void main() { auto b = Test(); // Error: struct Test cannot deduce function from argument types !()() auto c = Test!()(); // Compiles } ``` There's no reason to force the user to use explicit template parentheses. Please allow these to be dropped just like functions. --