need clarification: will typedef, C struct initialization, etc.

Kagamin spam at here.lot
Tue Jun 1 03:04:19 PDT 2010


Leandro Lucarella Wrote:

> I think he talks about this difference:
> 
> alias int a1;
> alias int a2;
> typedef int t1;
> typedef int t2;
> 
> void fa(a2 a) {}
> void ft(t2 t) {}
> 
> void main() {
> 	a1 a = 5;
> 	fa(a); // <--- compiles fine
> 	t1 t = 10;
> 	ft(t); // <--- error
> }
windows handles are not orthogonal, they're polymorphic. For example, CloseHandle function accepts almost any handle.


More information about the Digitalmars-d mailing list