This shouldn't happen

bearophile bearophileHUGS at lycos.com
Sat Apr 28 05:58:42 PDT 2012


Stewart Gordon:

> Windows handles are, AIUI, always of the platform pointer size.
>  A zero-size handle type would be useless, as only one distinct 
> handle could exist that way.

struct HWND {}
void main() {
     static assert(HWND().sizeof == 1);
}


Bye,
bearophile


More information about the Digitalmars-d mailing list