Test::operator new
<p>I tried to implement this:</p>

<pre><code>namespace Test
{
    void* operator new(size_t s)
    {
        return malloc(s);
    }
}
</code></pre>

<p>But g++ (4.3.1) says:</p>

<pre><code>void* Test::operator new(size_t)’ may not be declared within a namespace
</code></pre>

<p>Am I doing something wrong?</p>

<p>If yes, is there anyway to overload the operator new to be used in my classes? I do not want to create a base class and make all my classes inherit from such base class.</p>
