Returning Rvalue Reference to assign to a Lvalue

后端 未结 0 1986
感情败类
感情败类 2020-11-21 21:17
class X{
  public:
  int a;
  int b;
  X(){}
  X(int a,int b=0):a(a),b(b){}
}; 

X&& operator+(const X& a,const X& b){ 
  return move(X((a.a+b.a),(a.         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题