我在c ++中使用list类,我不知道allocator在这里是什么意思
template < class T, class Allocator = allocator<T> > class list;
如果我有list <int> mylist它意味着当一个元素添加到列表时使用分配器分配整数类型的内存?什么时候需要自定义分配器?
list <int> mylist
c++
c++ ×1