This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++17 status.
Section: 16.3.2.4 [structure.specifications] Status: C++17 Submitter: Dawn Perchik Opened: 2016-04-14 Last modified: 2017-07-30
Priority: 3
View other active issues in [structure.specifications].
View all other issues in [structure.specifications].
View all issues with C++17 status.
Discussion:
Some Effects: were intended to include the "Equivalent to" phrasing where no or different words were used.
See examples in std::filesystem
and throughout the library.
The wording in [structure.specifications]/4 is incorrect and Effects: throughout the library which use (or were intended to use) the "Equivalent to" phrasing need to be checked to make sure they fit the intended wording.
[2016-04, Issues Telecon]
The PR is fine; but bullet #1 in the report really should have a list of places to change.
Jonathan checked throughout the library for bullet #2 and found two problems in [string.access], which have been added to the PR.[2016-08-03 Chicago]
Fri PM: Move to Tentatively Ready
Proposed resolution:
Change [structure.specifications]/4 as indicated:
"[…] if
F
has no Returns: element, a non-void
return fromF
is specified by theReturns: elementsreturn statements in the code sequence."
Add two return
keywords to [string.access]:
const charT& front() const; charT& front();-7- Requires:
!empty()
.-8- Effects: Equivalent to
return operator[](0)
.const charT& back() const; charT& back();-9- Requires:
!empty()
.-10- Effects: Equivalent to
return operator[](size() - 1)
.