returning bool value into C- environment
<p>Say I have a function pointer in C- library</p>

<pre><code>int (*fptr)(void);
</code></pre>

<p>And I have a class in c++</p>

<pre><code>class A { static int func(); }
</code></pre>

<p>I can do following and it will be safe on any platform</p>

<pre><code>ftpr = A::func;
</code></pre>

<p>I would like for <code>A::func()</code> to return <code>bool</code>.</p>

<pre><code>class A { static bool func(); }
</code></pre>

<p>and I do not mind casting</p>

<pre><code>fptr = reinterpret_cast&lt;int(*)()&gt;(A::func);
</code></pre>

<p>But will it be safe on any platform? At the first glance it seems like it will (as long as <code>sizeof(bool) &lt;= sizeof(int)</code>) but I am not so sure.</p>
