Title
Impossible container requirements for adaptor types
Status
c++14
Section
[container.adaptors]
Submitter
Sebastian Mach

Created on 2012-10-05.00:00:00 last changed 130 months ago

Messages

Date: 2013-09-29.10:45:42

Proposed resolution:

This wording is relative to N3376.

  1. Change [container.adaptors.general] p1 as indicated:

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

Date: 2013-09-15.00:00:00

[ 2013-09-29, Chicago ]

Apply to Working Paper

Date: 2013-04-15.00:00:00

[ 2013-04-20, Bristol ]

Unanimous consensus that queue and stack are not meant to be sequences.

Decision: move to tentatively ready

Date: 2012-10-06.11:56:48

[ Daniel adds concrete wording. ]

Date: 2012-10-05.00:00:00

The stack class template does not have an member type iterator, and therefore instantiations do not meet the general container requirements as described in [container.requirements.general]. But [container.adaptors.general] p1 says:

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

Since sequence containers is a subset of general containers, this imposes requirements on the container adaptors that are not satisfied.

Daniel Krügler: The wording change was performed as an editorial reorganization as requested by GB 116 occuring first in N3242, as a side-effect it does now make the previous implicit C++03 classification to [lib.sequences]/1 more obvious. As the NB comment noticed, the adaptors really are not sequences nor containers, so this wording needs to be fixed. The most simple way to realize that is to strike the offending sentence.

History
Date User Action Args
2014-02-20 13:20:35adminsetstatus: wp -> c++14
2013-09-29 10:45:42adminsetmessages: + msg6660
2013-09-29 10:45:42adminsetstatus: voting -> wp
2013-09-23 13:24:31adminsetstatus: ready -> voting
2013-05-20 16:25:01adminsetmessages: + msg6511
2013-05-20 16:25:01adminsetstatus: new -> ready
2012-10-06 11:56:48adminsetmessages: + msg6155
2012-10-06 11:56:48adminsetmessages: + msg6154
2012-10-05 00:00:00admincreate