我对它们之间的差异感到有点困惑
Type operator + (const Type &type);
Type &operator += (const Type &type);
Run Code Online (Sandbox Code Playgroud)
和
friend Type operator + (const Type &type1, const Type &type2);
friend Type &operator += (const Type &type1, const Type &type2);
Run Code Online (Sandbox Code Playgroud)
哪种方式是首选,它们看起来像什么,什么时候应该使用?