04 2023 档案
摘要:在实际生产环境中,遇到使用map还是unordered_map的场景。 一方面,有unordered_map需要自定义hash函数,导致构建时比较复杂。而map使用的是比较运算符来判断元素在map中的位置,std::vector有比较运算符,所以构建map比较简单。 另一方面,unordered_m
阅读全文
摘要:sed 使用sed来为函数统一添加宏包含 sed -i 's/dataTypeCast;/FUNC_CALL;/g' file 会对dataTypeCast函数添加FUNC_CALL包含。 dataTypeCast(abcd); ==> FUNC_CA
阅读全文