阅读背景:

有效的C++项目23更喜欢非成员非朋友函数而不是成员函数

来源:互联网 

While puzzling with some facts on class design, specifically whether the functions should be members or not, I looked into Effective c++ and found Item 23, namely, Prefer non-member non-friend functions to member functions. Reading that at first hand with the web browser example made some sense, however convenience functions( named the nonmember functions like this in the book) in that example change the state of the class, don't they? While puzzling with some facts on class design,




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: