Error: struct Foo(T = int) is used as a type

Namespace rswhite4 at googlemail.com
Wed Oct 9 16:06:21 PDT 2013


----
import std.stdio;

struct Foo(T = int) { }

void main()
{
	Foo f;
}
----
Error: Error: struct Foo(T = int) is used as a type

If I change Foo f into Foo!() f it works. Is the compiler not 
able to see that this is not necessary, since I have a default 
type?


More information about the Digitalmars-d-learn mailing list