You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LWG-617: [sequences.general] <array> claimed to define a template meeting sequence container requirements #5916
[sequences.general] paragraph 1 claims that <array> is one of various headers that define class templates that meet the requirements for sequence containers.
According to [sequence.reqmts]p5, array does not meet the sequence container requirements. It can't meet the initialization requirements just after it.
5 #
A type X meets the sequence container requirements if X meets the container requirements and the following statements and expressions are well-formed and have the specified semantics.
So only [sequences.general]p1 is wrong:
1 #
The headers , , <forward_list>, , and define class templates that meet the requirements for sequence containers.
array<T, N> for N > 0 doesn't meet [container.reqmts]/10, so many specializations of array are neither containers nor contiguous containers, which means [array.overview]/1 and /3 are contradictory as well.
I don't think we can fix this all editorially, this probably deserves an LWG issue. (I think we probably want to make array be a sequence container by changing the requirements rather than yanking all the wording that suggests array is a sequence container.)
changed the title [-][sequences.general] <array> claimed to define a template meeting sequence container requirements[/-][+]LWG-617: [sequences.general] <array> claimed to define a template meeting sequence container requirements[/+]on Oct 31, 2022
Activity
JohelEGP commentedon Oct 25, 2022
Why not? Reading [sequence.reqmts], it seems the intent is for it to be one, which means this is not editorial:
hubert-reinterpretcast commentedon Oct 25, 2022
Just before the part you quoted, we have:
Thus, in context, the sentence you quoted is saying that, except for specific reasons why it isn't,
arrayis a sequence container.JohelEGP commentedon Oct 25, 2022
This formulation seems wrong, because it is, according to the wording. Can you show a requirement it fails to meet?
hubert-reinterpretcast commentedon Oct 25, 2022
Just read [array.overview] paragraph 3?
JohelEGP commentedon Oct 26, 2022
So [array.overview]p3 disagrees with [sequences.general]p1 and [sequence.reqmts]p1.
CaseyCarter commentedon Oct 26, 2022
Meeting some of the requirements does not preclude meeting all of the requirements.
JohelEGP commentedon Oct 26, 2022
According to [sequence.reqmts]p5,
arraydoes not meet the sequence container requirements. It can't meet the initialization requirements just after it.So only [sequences.general]p1 is wrong:
CaseyCarter commentedon Oct 26, 2022
array<T, N>forN > 0doesn't meet [container.reqmts]/10, so many specializations ofarrayare neither containers nor contiguous containers, which means [array.overview]/1 and /3 are contradictory as well.I don't think we can fix this all editorially, this probably deserves an LWG issue. (I think we probably want to make
arraybe a sequence container by changing the requirements rather than yanking all the wording that suggestsarrayis a sequence container.)CaseyCarter commentedon Oct 26, 2022
This was LWG-617, which I believe was incorrectly resolved NAD.
JohelEGP commentedon Oct 29, 2022
And now it has been reopened.
[-][sequences.general] <array> claimed to define a template meeting sequence container requirements[/-][+]LWG-617: [sequences.general] <array> claimed to define a template meeting sequence container requirements[/+]