 Google C++ Style GuideAvoid virtual method calls in constructors, and avoid initialization that can fail if you can’t signal an error. It is possible to perform arbitrary initialization in the body of the constructor. • class is not currently subclassed, causing much confusion. • There is no easy way for constructors to signal errors, short of crashing the program (not always appropriate) or using exceptions (which are for-0 码力 | 83 页 | 238.71 KB | 1 年前3 Google C++ Style GuideAvoid virtual method calls in constructors, and avoid initialization that can fail if you can’t signal an error. It is possible to perform arbitrary initialization in the body of the constructor. • class is not currently subclassed, causing much confusion. • There is no easy way for constructors to signal errors, short of crashing the program (not always appropriate) or using exceptions (which are for-0 码力 | 83 页 | 238.71 KB | 1 年前3
共 1 条
- 1













