上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 68 下一页
摘要: title: CMake find_package兼容add_subdirectory date: 2023-08-25 17:15:50 tags: 如果依赖是通过add_subdirectory添加的,那么find_package的时候会报错找不到xxx-config.cmake。 实际上通过a 阅读全文
posted @ 2024-09-28 14:05 寻找繁星 阅读(71) 评论(0) 推荐(0)
摘要: title: 把boost::bind的返回值插入到std::unordered_map中 date: 2020-05-03 12:56:26 tags: 只能以insert的形式插入,不能以[]的形式插入。原因不明。 不同的类里的成员函数不能插入同一个unordered_map中。 同一个类里的相 阅读全文
posted @ 2024-09-28 14:05 寻找繁星 阅读(25) 评论(0) 推荐(0)
摘要: title: 右值引用 date: 2022-10-04 22:19:01 tags: 带名字的右值引用使用的时候会变成左值引用 result type must be constructible from input type #include <iostream> #include <vecto 阅读全文
posted @ 2024-09-28 14:05 寻找繁星 阅读(57) 评论(0) 推荐(0)
摘要: title: websocketpp读取二进制 date: 2020-06-07 16:50:28 tags: 直接msg->get_payload().data()就好了。 std::string里可以装'\0',用data()就可以访问。 参考: https://github.com/zapho 阅读全文
posted @ 2024-09-28 14:05 寻找繁星 阅读(46) 评论(0) 推荐(0)
摘要: title: std::shared_ptr转std::unique_ptr date: 2022-10-03 20:10:36 tags: 不能直接转,只能将其移动到另一个用std::unique_ptr管理的对象里。 #include <iostream> #include <memory> i 阅读全文
posted @ 2024-09-28 14:05 寻找繁星 阅读(47) 评论(0) 推荐(0)
摘要: title: pb_ds学习笔记 date: 2020-03-30 22:39:47 文档:Policy-Based Data Structures 相关文章:pb_ds库实现支持多个相同的值的名次树 建议使用 using namespace __gnu_pbds; tree 参考:https:// 阅读全文
posted @ 2024-09-28 14:05 寻找繁星 阅读(46) 评论(0) 推荐(0)
摘要: title: "error: use of deleted function ‘std::pair<const int, int>& std::pair<const int, int>::operator=(cons" date: 2021-02-22 14:23:25 error: use of 阅读全文
posted @ 2024-09-28 14:05 寻找繁星 阅读(67) 评论(0) 推荐(0)
摘要: title: cppunit for linux入门笔记 date: 2020-05-25 12:20:48 tags: 我是用apt安装的 sudo apt install -y libcppunit-dev libcppunit-doc mkdir -p ~/doc ln -s /usr/sha 阅读全文
posted @ 2024-09-28 14:05 寻找繁星 阅读(30) 评论(0) 推荐(0)
摘要: title: C++ memory order date: 2023-03-16 15:40:17 tags: 现代处理器是乱序执行的。虽然现代处理器通常而言保证了一个线程可以认为自己是串行执行的,也就是说前面的指令一定不会受到当前线程的后面的指令的影响,而且后面的指令一定可以看到前面的指令的执行结 阅读全文
posted @ 2024-09-28 14:05 寻找繁星 阅读(69) 评论(0) 推荐(0)
摘要: title: constexpr函数中使用循环 date: 2021-12-27 22:55:23 tags: 从C++14开始,constexpr函数中也可以使用循环了。 constexpr int pow(int a, int b) { int ans = 1; while (b--) { an 阅读全文
posted @ 2024-09-28 14:05 寻找繁星 阅读(36) 评论(0) 推荐(0)
上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 68 下一页