On Friday, 23 November 2012 at 13:57:14 UTC, Vladimir Panteleev wrote:
If breaking code were not an issue, the best solution would be to make HANDLE a unique, opaque type (like a struct wrapping an intptr_t or void*) - which is exactly how it should be treated. It would need to support assignment/creation from "null" though.

Oh, I think I remembered. I believe the proper solution is to create a dummy struct type, and make HANDLE a const pointer to it. Then it cannot be confused with other types, but still accepts null assignments.

Reply via email to