在C ++容器中使用分配器 [英] Use of allocators in a C++ containers

查看:75
本文介绍了在C ++容器中使用分配器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道我们可以在vector中使用allocator(例如:std :: vector< A,std :: allocator< A>>)。同样,我们可以为剩余容器分配数组,例如数组,列表,映射等。如果是,那么如何使用分配器用于那些容器?

I know that we can use allocators in vector (for example: std::vector<A, std::allocator<A>>). Similarly can we have allocators for remaining containers such as Array, list, map, etc. If yes, then how to use allocator for those containers?

推荐答案

你的qustion应该在C ++论坛中被问到,这个是关于Small Basic语言
Your qustion should be asked in the C++ forum, this one is about the Small Basic language


这篇关于在C ++容器中使用分配器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆