多くのメンバーを含む構造体と、次のような == の演算子のオーバーロードがあります。
struct Adjustment {
ObjectNumber aD;
Foo afoo;
bool operator == (const Adjustment& aAdjustment) const
{ return (aAdjustment.ID == ID); }
};
そして、コードで私が持っているとき:
if(someAdjustment == NULL)
それは私に与えます:
error C2678: binary '==' : no operator found which takes a left-hand operand of type 'Unit::Adjustment' (or there is no acceptable conversion)
だから私の質問は、コードを変更せずに、この構造体が設定されているかどうかを確認するにはどうすればよいですか?