【发布时间】:2011-04-29 18:56:31
【问题描述】:
为什么 C++0x 无序关联容器不使用 allocator_traits 来定义其成员类型指针和 const_pointer?
例如,顺序和有序的关联容器使用以下定义:
typedef typename allocator_traits<Allocator>::pointer pointer;
typedef typename allocator_traits<Allocator>::const_pointer const_pointer;
而无序的关联容器使用这个:
typedef typename Allocator::pointer pointer;
typedef typename Allocator::const_pointer const_pointer;
我错过了什么?
【问题讨论】:
标签: c++ c++11 containers