C++ How to assign object without calling constructor
<p>I have a class:</p>

<pre><code>class C {
public:
    C(): _a(a++){}
private:
    static int a;
    int _a;
};

int C::a = 0;
C c = C(); // c._a is 0
C d = C(); // d._a is 1
C e = C(); // e._a is 2
</code></pre>

<p>This works out as I'd expect: a and obj._a increment by 1. But if I assign c, d, and e to an unordered_map, they increment by 2:</p>

<pre><code>unordered_map&lt;int, C&gt; map;
C c = C(); // c._a is 0
map[0] = c;
C d = C(); // d._a is 2
map[1] = d;
C e = C(); // e._a is 4
map[2] = e;
</code></pre>

<p>How can I assign c, d, and e to map and still make the static int a increment by 1?</p>