why use static function here?# Programming - 葵花宝典
g*n
1 楼
from effective C++ (2nd ed) item 28
struct widgets{
class widget {....};
static const Widget operator+(const Widget& lsh, const Widget& rhs);
....
};
I am wondering why declare a overloaded operator static?
struct widgets{
class widget {....};
static const Widget operator+(const Widget& lsh, const Widget& rhs);
....
};
I am wondering why declare a overloaded operator static?