title: about vs/g++ with copy-constructor
body: <p>I'm trying to compile the code in Visual Studio (2008) and g++.<br>
  In vs2008 it's successful, but in g++ it reported error.<br>
  if add <code>const</code>,<br>
  <code>test(const test &amp;source):a(source.a) {}</code><br>
  g++ will compiled succeed.<br>
  I kown that <code>test aa = 2;</code> will create a  temporary object and call copy-constructor.<br>
  <strong>temporary object cannot bind to a non-const reference</strong><br>
  so,why the vs2008 can compiled it succeed?</p>
  
  <pre><code>class test{  
  public:  
      test():a(1) {}  
      test(int num):a(num) {}
      test(test &amp;source):a(source.a) {}  
  private:
      int a;
  };
  
  int main(){
      test aa = 2;
      return 0;
  }
  </code></pre>