10 2011 档案

 
为什么需要allocator的rebind接口
摘要:from:http://topic.csdn.net/u/20080226/04/d3187cbf-c72e-4f29-b6f0-ed05e1f65f95.html laomai rebind的本质应该这么说:给定了类型T的分配器Allocator=allocator<T>,现在想根据相同的策略得到另外一个类型U的分配器allocator<U>,那么allocator<U> = allocator<T>::Rebind<U>::other.之所以要提供rebind界面,是因为容器只知道模板参数名Allocator,而不是其具体实现,容 阅读全文
posted @ 2011-10-23 11:42 做个不善的人 阅读(1125) 评论(0) 推荐(0) 编辑

 

点击右上角即可分享
微信分享提示