confusion about c++ reference in class
<p>The following code is correct</p>

<pre><code>    string s1="abc";
    string s2="bcd";
    string &amp;rs1=s1;
    string &amp;rs2=s2;
    rs1=rs2;
    cout&lt;&lt;rs1&lt;&lt;"----"&lt;&lt;rs2&lt;&lt;endl;
</code></pre>

<p>And thefollowing code will compile error:</p>

<pre><code>class A
{
public:
    A(string&amp; a):ma(a) { }

    string&amp; ma;
};

string s1="abc";
string s2="bcd";
A oa(s1);
A ob(s2);
oa=ob;
cout&lt;&lt;oa.ma&lt;&lt;"----"&lt;&lt;ob.ma&lt;&lt;endl;
</code></pre>

<p>All above is <code>string&amp;</code> type assignment, why put them into class will cause a compile error?
(gcc version 4.7.1 )</p>

<p>error info is  </p>

<pre><code>non-static reference member 'std::string&amp; A::ma', can't use default assignment operator
</code></pre>
