- C++相談室 part117 [転載禁止]©2ch.net
914 :デフォルトの名無しさん[]:2015/06/29(月) 23:13:20.66 ID:y0FiN7DE - ある構造体に==演算子を定義する場合
friendにするべきなのでしょうか? 下記、二つの違いがわかりません。 struct A{ bool operator==(const A& rhs){ return true;} friend bool operator==(const A& lhs,const A& rhs){ return true;} };
|
|