Automatic cast to pointer without automatic cast to bool(-like) possible?
<p>Is is possible to create a class <code>Wrapper</code> such that</p>

<pre><code>void f(void *) {}

Wrapper w;
f(w);
</code></pre>

<p>compiles, but</p>

<pre><code>Wrapper w;
if (w) {}
</code></pre>

<p>doesn't compile? Or detect the difference at runtime?</p>

<p>Background: A win32 <code>HANDLE</code> is a typedef for <code>void *</code>. Win32 doesn't use <code>NULL</code> but instead <code>((HANDLE)(-1))</code> as an error value, so any code implicitly casting a <code>HANDLE</code> to bool is almost certainly testing the wrong thing. I have a class wrapping a <code>HANDLE</code>, and if possible I would like to remove this opportunity for errors when using the wrapper class.</p>
