Large scale usage of Meyer's advice to prefer Non-member,non-friend functions?

后端 未结 8 1101
無奈伤痛
無奈伤痛 2021-02-05 00:15

For some time I\'ve been designing my class interfaces to be minimal, preferring namespace-wrapped non-member functions over member functions. Essentially following Scott Meyer

8条回答
  •  情深已故
    2021-02-05 01:03

    OpenCV library does this. They have a cv::Mat class that presents a 3D matrix (or images). Then they have all the other functions in the cv namespace.

    OpenCV library is huge and is widely regarded in its field.

提交回复
热议问题