Google C++ Style Guidemust exam- ine all of its transitive callers. Either they must make at least the basic exception safety guarantee, or they must never catch the exception and be happy with the program terminating as a exceptions can be used, but at the cost of more that a developer needs to know and understand. • Exception safety requires both RAII and different coding practices. Lots of supporting machinery is needed to make after construction. The mutable keyword is allowed but is unsafe when used with threads, so thread safety should be carefully considered first. Where to put the const Some people favor the form int const0 码力 | 83 页 | 238.71 KB | 1 年前3
共 1 条
- 1













