https://issues.dlang.org/show_bug.cgi?id=14416
Issue ID: 14416
Summary: .sizeof yields 1 for uninstantiated struct templates
Product: D
Version: D2
Hardware: x86
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: DMD
Assignee: [email protected]
Reporter: [email protected]
Consider:
struct S(T)
{
int x;
}
void main()
{
import std.stdio;
writeln(S.sizeof);
writeln(S!int.sizeof);
}
This program prints 1 4. The first call shouldn't compile.
--
