加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c – 序列容器不是一般容器的子集吗?

发布时间:2020-12-16 07:32:36 所属栏目:百科 来源:网络整理
导读:stack没有iterator-member-type,因此不符合一般容器要求:[container.requirements.general]. 但是在[container.adaptors.general]中 The headers queue and stack define the container adaptors queue , priority_queue ,and stack . These container adap
stack没有iterator-member-type,因此不符合一般容器要求:[container.requirements.general].

但是在[container.adaptors.general]中

The headers <queue> and <stack> define the container adaptors queue,priority_queue,and stack. These
container adaptors meet the requirements for sequence containers.

序列容器不是一般容器的子集吗?

解决方法

序列容器是一般容器的子集.

但是,序列适配器不符合序列容器特定的要求(没有插入成员函数),并且您已经注意到也不满足一般容器要求.我不认为[container.adaptors.general]应该说他们这样做,但它确实说我在C 11草稿中.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读