C++ C2582 Compiler won't auto-generate default c'tor or = operator
<p>setting aside the fact that I use getter/setter where the more experienced C++-programmer won't make use of them I have a problem with the following code:</p>

<pre><code>#include "Player.h"

class Entity 
{
public:
    Entity::Entity(Player&amp; _owner) 
        : owner(_owner) { }
    Player &amp;get_owner() { return this-&gt;owner; }
    void set_owner(Player &amp;_owner) { this-&gt;owner = _owner; }

private:
    Player &amp;owner;
};
</code></pre>

<p>This gives me a C2582 saying the 'operator =' is unavailable for Player in the set_owner function. My Player class looks like this:</p>

<pre><code>class Layer;
class Cell;

class Player
{
public:
    Player();
    void credit_to_balance(const long &amp;_amount);
    ..more getter/setter..
private:
    long balance;
    Layer &amp;current_layer;
    Cell &amp;current_cell;
};
</code></pre>

<p>Until now I thought my default constructor/destructor and = operator would !always! be constructed by the compiler if I haven't done it myself (and they are used throughout the program). Apparently this isn't the case this time as other classes would also complain about removing the manually inserted default c'tor from Player. I even tried to write a small example program that does exactly the same (even with forward declaration and members that are references) and it worked. </p>

<p>And in my opinion it definitely should, because it would only copy some references and an intrinsic type. This is why I did not yet try to write my own = operator as I see no difficulties for the compiler to do that for me. For me it would lead into the problem of having in mind to update it each time I'm introducing new members to my class.</p>

<p>So much for my thoughts on this problem. I hope you guys can show me what I'm missing :)
Thanks in advance!</p>
