What is the best practice when defining const& and && version of a set method?

后端 未结 0 1873
别那么骄傲
别那么骄傲 2021-01-29 14:25

If I want to define a method like a setter for a std::vector member (or movable object) I can do it like this:

 void set(const std::vector& v) { _v         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题