Other operators
Other operators
Operator name | Syntax | Overloadable | Prototype examples (for class T ) |
|
---|---|---|---|---|
Inside class definition | Outside class definition | |||
function call | a(a1, a2) | Yes | R T::operator()(Arg1 &a1, Arg2 &a2, ... ...); | N/A |
comma | a, b | Yes | T2& T::operator,(T2 &b); | T2& operator,(const T &a, T2 &b); |
ternary conditional | a ? b : c | No | 登录查看完整内容
|