Why is the new operator allowed to return *void to every pointer-type?
<p>In C++ it is not allowed to assign an void* pointer to any integral pointer without an explicit cast. This requires the use of an static_cast.</p>

<p>But what is with this:</p>

<pre><code>int* iptr = new int;
</code></pre>

<p>I know that new operator is defined as following:</p>

<pre><code>void* operator new(size_t);
</code></pre>

<p>How does C++ handle this?
I know that this is a basic question, but important. I also know that low-level code must use void. But how can this assignment be legal? iptr is a pointer to an int and new returns a pointer to void, which should trigger a message like "error: invalid conversion from ‘void*’ to ‘int*’ [-fpermissive]".</p>
