记录一下 __gnu_cxx::hash_map传一个新allocator的写法
2012-02-23 16:30
344 查看
老得查代码写,这里记录一下:
hash_map(size_type __n, const hasher& __hf, const key_equal& __eql, const allocator_type& __a = allocator_type()) // 全局的角色指针Allocator __gnu_cxx::__pool_alloc<Role*> g_rolePtrAlloc; typedef __gnu_cxx::hash_map< uint32_t, Role*, __gnu_cxx::hash<uint32_t>, std::equal_to<uint32_t>, __gnu_cxx::__pool_alloc<Role*> > Roles; Roles roles(5000, __gnu_cxx::hash<uint32_t>(), std::equal_to<uint32_t>(), g_rolePtrAlloc);
相关文章推荐
- 记录一下 __gnu_cxx::hash_map传一个新allocator的写法
- [STL] __gnu_cxx::hash_map使用中的一些问题
- __gnu_cxx::hash_map使用中的一些问题
- __gnu_cxx::hash_map死循环一例
- 32bit g++编译64位整数作为key的__gnu_cxx::hash_map的编译错误问题
- __gnu_cxx::hash_map死循环分析
- 32bit g++编译64位整数作为key的__gnu_cxx::hash_map的编译错误问题
- 之前做EXT的用的一个JS的MAP记录一下
- 记录一下C#+Oracle批量插入的一个方法
- 一个sql例子,分组,查询,统计等操作,老忘记,记录一下
- 在vs中使用hash_map的一个小总结
- js判断checkbox选中(记录一下,一个小问题引发的)
- 《影子跟随算法》目前试着自己写一个联网双人对战的小游戏 看到一篇网络同步的文章很受启发 这里记录一下
- 学到一个小细节,记录一下
- 记录一下触发器的写法
- 在SQL语句中查询多条记录并把多条记录同一字段的值连接成一个字符并返回的写法
- 记录一个python公式罗列的方法 join()方法和map()方法的妙用
- 最近开发遇到一个传值和引用问题 记录一下
- 微信 oauth 登录 ,回调两次,一个坑,记录一下。
- 在ubuntu上遇到的一个错误。记录一下。