c++ - 为什么无序关联容器在 C++0x 中不使用 allocator_traits<T>

标签 c++ c++11 containers

为什么 C++0x 无序关联容器不使用 allocator_traits 来定义它们的成员类型 pointer 和 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;

我错过了什么?

最佳答案

我认为您没有遗漏任何东西。这是您参与标准流程的机会。请提交问题。有关如何操作的说明,请参见此处:

http://lwg.github.com/issues/lwg-active.html#submit_issue

我扫描了,但没有发现关于这个主题的现有问题。

关于c++ - 为什么无序关联容器在 C++0x 中不使用 allocator_traits<T>,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5836178/

相关文章:

c++ - 即使在 std::shared_ptr 拥有之后,shared_from_this 还是空的 _M_weak_this

c++ - 在 C++ 中使用 decltype()、auto 或 RTTI 进行类型相等性测试? Boost 有这个功能吗?

c++ - condition_variable 项不计算为采用 0 个参数的函数

networking - 如何获取客户端外部 ip,我使用 Gcloud/kubernetes

c++ - 具有特定于子类的模板化参数类型的 Qt SIGNAL 架构

c++ - 如果 QTreeView 项没有子项,则禁用 QAction

C++ 类成员和延迟初始化

c++ - 在函数中计算模数与直接使用 % 运算符给出不同的答案

python - 如何从 Dockerized Python Web 应用程序提供静态文件?

具有可交换元素的 C++ 固定大小容器