C++ Coding Guideline 102

前端 未结 5 2223
忘了有多久
忘了有多久 2021-02-08 23:35

If you were allowed to add another coding guideline to the 101 guidelines of the \"C++ coding standards\" (Herb Sutter and Andrei Alexandrescu), which would you add?

5条回答
  •  走了就别回头了
    2021-02-09 00:11

    Prefer constructors to init()/setup() functions.

    Why manipulating an object that may be in an unusable state? Isn't it better to not have it at all ?

提交回复
热议问题