<div>Greetings</div><div><br></div><div>Kindly look at the code below. When I try to compile it with DMD 2-53, I get an error:</div><div><div><br></div><div>foo.d(9): Error: struct template.Foo(int n = 1) is used as a type</div>

</div><div><br></div><div>It would be convenient if I am allowed to use Foo as a type without passing parameters (with parameterized functions that is the default behavior). I want to understand if not being able to instantiate Foo with default parameters is a bug in DMD? Otherwise If it is not allowed in D2, I want to know why such a limitation is there.</div>

<div><br></div><div>Regards</div><div>- Puneet</div><div><br></div><div>import std.stdio;</div><div><br></div><div>struct Foo(int n = 1) {</div><div>  public int value = n;</div><div>}</div><div><br></div><div>void main()</div>

<div>{</div><div>  Foo foo;<span class="Apple-tab-span" style="white-space:pre">    </span> // Does not compile</div><div>  // Foo!() foo; // This works</div><div>  writeln("Value is, ", foo.value);</div><div>}</div>

<div><br></div>