- 博客(2)
- 问答 (3)
- 收藏
- 关注
原创 switch 结构的 fall through
今天在LevelDB的源码~/util/hash.cc中看到一段: // The FALLTHROUGH_INTENDED macro can be used to annotate implicit fall-through // between switch labels. The real definition should be provided externally. // This
2017-01-05 16:00:01
8086
1
原创 C++ STL容器遍历删除元素的方法
C++ STL容器遍历删除元素的方法 上周在做内存池回收的时候,遍历deque(使用了双端队列来管理内存块)的每一个元素,查找满足条件的内存块并进行回收,结果竟然coredump了。 写了个简单的测试代码:#include <deque> #include <algorithm> #include <iostream> using namespace std;int main() {
2016-12-05 11:49:42
4200
空空如也
USB gadget设备如何修改名字?
2017-04-22
关于select函数的一些疑问
2016-06-24
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅