运算符重载的基本规则和惯用法是什么? - What are the basic rules and idioms for operator overloading?

问题:

Note: The answers were given in a specific order , but since many users sort answers according to votes, rather than the time they were given, here's an index of the answers in the order in which they make most sense: 注意:答案是按特定顺序给出的,可是因为许多用户是根据投票而不是给出时间来对答案进行排序的,所以如下是最有意义的顺序索引 c++

(Note: This is meant to be an entry to Stack Overflow's C++ FAQ . If you want to critique the idea of providing an FAQ in this form, then the posting on meta that started all this would be the place to do that. Answers to that question are monitored in the C++ chatroom , where the FAQ idea started out in the first place, so your answer is very likely to get read by those who came up with the idea.) (注意:这原本是Stack Overflow的C ++ FAQ的条目。若是您想批评以这种形式提供FAQ的想法,那么在全部这些开始的meta上的张贴将是这样作的地方。该问题在C ++聊天室中进行监控,该问题最初是从FAQ想法开始的,因此提出这个想法的人极可能会读懂您的答案。) 数组


解决方案:

参考一: https://stackoom.com/question/IYHq/运算符重载的基本规则和惯用法是什么
参考二: https://oldbug.net/q/IYHq/What-are-the-basic-rules-and-idioms-for-operator-overloading
相关文章
相关标签/搜索