How can I overload the operator& in C++
<p>How can I overload the operator&amp; in C++? I've tried this:</p>

<pre><code>#ifndef OBJECT_H
#define OBJECT_H
#include&lt;cstdlib&gt;
#include&lt;iostream&gt;

namespace TestNS{

    class Object{
    private:
        int ptrCount;
    public: 
        Object(): ptrCount(1){           
            std::cout &lt;&lt; "Object created." &lt;&lt; std::endl;
        }
        void *operator new(size_t size);
        void operator delete(void *p);
        Object *operator&amp; (Object obj);
    };

    void *Object::operator new(size_t size){            
            std::cout &lt;&lt; "Pointer created through the 'new' operator." &lt;&lt; std::endl; 
            return malloc(size);
        }

    void Object::operator delete(void *p){
            Object * x = (Object *) p;
            if (!x-&gt;ptrCount){
                free(x);
                std::cout &lt;&lt; "Object erased." &lt;&lt; std::endl;
            }
            else{
                std::cout &lt;&lt; "Object NOT erased. The " &lt;&lt; x-&gt;ptrCount &lt;&lt; "references are exist." 
                    &lt;&lt; std::endl;
            }
        }

    Object *Object::operator&amp; (Object obj){
            ++(obj.ptrCount);
            std::cout &lt;&lt; "Counter is increased." &lt;&lt; std::endl;
            return &amp;obj;
        }
}
#endif
</code></pre>

<p>Tne main function:</p>

<pre><code>#include&lt;iostream&gt;
#include"Object.h"

namespace AB = TestNS;

int main(int argc, char **argv){
    AB::Object obj1;
    AB::Object *ptrObj3 = &amp;obj1; // the operator&amp; wasn't called.
    AB::Object *ptrObj4 = &amp;obj1; // the operator&amp; wasn't called.

    AB::Object *obj2ptr = new AB::Object();
}
</code></pre>

<p>The output result:</p>

<blockquote>
  <p>Object created. </p>
  
  <p>Pointer created through the 'new' operator. </p>
  
  <p>Object created.</p>
</blockquote>

<p>My operator&amp; wasn't called. Why?</p>
