06 2021 档案

摘要:对于全局静态的数据可以这样写 inline const char* GetDigitsLut() { static const char cDigitsLut[200] = { '0','0','0','1','0','2','0','3','0','4','0','5','0','6','0',' 阅读全文
posted @ 2021-06-30 16:43 cyssmile 阅读(78) 评论(0) 推荐(0)
摘要:今天遇到这样一个现象,我打印bitset中的数据,输出本身顺序相反 而实际使用GLOG输出时是这样的 后面我用标准输出,发现也是一样的。 我反复调试了几组结果,发现就是倒序打印的。 阅读全文
posted @ 2021-06-30 11:21 cyssmile 阅读(178) 评论(0) 推荐(0)
摘要:c++11中快速删除,字符串中的空格,大写字母,小写字母,数字等等。 这里写了一个快速删除大写字母 #include <iostream> #include <string> #include <algorithm> int main() { std::string str = "1231324 2 阅读全文
posted @ 2021-06-11 17:40 cyssmile
摘要:模板元递归展开 template <typename T> void SetParams(const std::string& param_name, T&& param) { params_[param_name] = std::forward<T>(param); } /** * @brief 阅读全文
posted @ 2021-06-11 17:12 cyssmile