Google C++ Style Guidetransfer of pointer ownership), leaving textual hints for the reader at the point of use is valuable (std::unique_ptr demonstrates the ownership transfer unambiguously at the call site). Be consistent with with a default value, or migrating to a new namespace. • Forward declaring symbols from namespace std:: yields undefined be- havior. • It can be difficult to determine whether a forward declaration or namespace a • Do not declare anything in namespace std, including forward declarations of standard library classes. Declaring entities in namespace std is unde- fined behavior, i.e., not portable. To declare0 码力 | 83 页 | 238.71 KB | 1 年前3
共 1 条
- 1













