 Google C++ Style Guidefunctionality is required, a class is more appropriate. If in doubt, make it a class. For consistency with STL, you can use struct instead of class for functors and traits. Note that member variables in structs std::function. • Lambdas are much more concise than other ways of defining function objects to be passed to STL algorithms, which can be a readability im- provement. • Appropriate use of default captures can remove of open() uint typedef 57 bigpos struct or class, follows form of pos sparse_hash_map STL-like entity; follows STL naming conventions LONGLONG_MAX a constant, as in INT_MAX Comments Though a pain to0 码力 | 83 页 | 238.71 KB | 1 年前3 Google C++ Style Guidefunctionality is required, a class is more appropriate. If in doubt, make it a class. For consistency with STL, you can use struct instead of class for functors and traits. Note that member variables in structs std::function. • Lambdas are much more concise than other ways of defining function objects to be passed to STL algorithms, which can be a readability im- provement. • Appropriate use of default captures can remove of open() uint typedef 57 bigpos struct or class, follows form of pos sparse_hash_map STL-like entity; follows STL naming conventions LONGLONG_MAX a constant, as in INT_MAX Comments Though a pain to0 码力 | 83 页 | 238.71 KB | 1 年前3
共 1 条
- 1













