Created on 2018-06-30.00:00:00 last changed 46 months ago
Proposed resolution:
This wording is relative to N4750.
[Drafting note: Two uses of & in [reverse.iterators] are not included in the wording below because the entire sentence is slated to be removed by a revision of P0896, the One Ranges Proposal.]
Change [time.parse] p4-5 as indicated:
template<class charT, class traits, class Alloc, class Parsable> unspecified parse(const basic_string<charT, traits, Alloc>& fmt, Parsable& tp, basic_string<charT, traits, Alloc>& abbrev);-4- Remarks: This function shall not participate in overload resolution unless
from_stream(declval<basic_istream<charT, traits>&>(), fmt.c_str(), tp,&addressof(abbrev))is a valid expression.
-5- Returns: A manipulator that, when extracted from a basic_istream<charT, traits> is, calls from_stream(is, fmt.c_str(), tp,&addressof(abbrev)).
Change [time.parse] p8-9 as indicated:
template<class charT, class traits, class Alloc, class Parsable> unspecified parse(const basic_string<charT, traits, Alloc>& fmt, Parsable& tp, basic_string<charT, traits, Alloc>& abbrev, minutes& offset);-8- Remarks: This function shall not participate in overload resolution unless
from_stream(declval<basic_istream<charT, traits>&>(), fmt.c_str(), tp,&addressof(abbrev), &offset)is a valid expression.
-9- Returns: A manipulator that, when extracted from a basic_istream<charT, traits> is, calls from_stream(is, fmt.c_str(), tp,&addressof(abbrev), &offset).
Change [string.accessors] p1 and p4 as indicated:
const charT* c_str() const noexcept; const charT* data() const noexcept;-1- Returns: A pointer p such that p + i ==
-2- Complexity: Constant time. -3- Requires: The program shall not alter any of the values stored in the character array.&addressof(operator[](i)) for each i in [0, size()].charT* data() noexcept;-4- Returns: A pointer p such that p + i ==
-5- Complexity: Constant time. -6- Requires: The program shall not alter the value stored at p + size().&addressof(operator[](i)) for each i in [0, size()].
Change [string.view.iterators] p4 as indicated:
constexpr const_iterator begin() const noexcept; constexpr const_iterator cbegin() const noexcept;-4- Returns: An iterator such that
(4.1) — if !empty(),&addressof(*begin()) == data_, (4.2) — otherwise, an unspecified value such that [begin(), end()) is a valid range.
Change [string.view.ops] p21 and p24 as indicated:
constexpr bool starts_with(charT x) const noexcept;-21- Effects: Equivalent to: return starts_with(basic_string_view(
&addressof(x), 1));[…]
constexpr bool ends_with(charT x) const noexcept;-24- Effects: Equivalent to: return ends_with(basic_string_view(
&addressof(x), 1));
Change [string.view.find] p5 as indicated:
-5- Each member function of the form
constexpr return-type F(charT c, size_type pos);is equivalent to return F(basic_string_view(
&addressof(c), 1), pos);
Edit [container.requirements.general], Table 77 — "Container requirements", as indicated:
Table 77 — Container requirements Expression Return type Operational
semanticsAssertion/note
pre/post-conditionComplexity […] (&a)->a.~X()void the destructor is applied to every element of a; any memory obtained is deallocated. linear […]
Edit [output.iterators], Table 90 — "Output iterator requirements (in addition to Iterator)", as indicated:
Table 90 — Output iterator requirements (in addition to Iterator) Expression Return type Operational
semanticsAssertion/note
pre/post-condition[…] ++r X& &addressof(r) ==&addressof(++r).
[…][…]
Edit [bidirectional.iterators], Table 92 — "Bidirectional iterator requirements (in addition to forward iterator)", as indicated:
Table 92 — Bidirectional iterator requirements (in addition to forward iterator) Expression Return type Operational
semanticsAssertion/note
pre/post-condition--r X& […]
&addressof(r) ==&addressof(--r).[…]
Change [re.traits] p6 as indicated:
template<class ForwardIterator> string_type transform(ForwardIterator first, ForwardIterator last) const;-6- Effects: As if by:
string_type str(first, last); return use_facet<collate<charT>>( getloc()).transform(&*str.begindata(),&*str.begindata() + str.length());
Change [re.regiter.cnstr] p2 as indicated:
regex_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, regex_constants::match_flag_type m = regex_constants::match_default);-2- Effects: Initializes begin and end to a and b, respectively, sets pregex to
&addressof(re), sets flags to m, then calls regex_search(begin, end, match, *pregex, flags). If this call returns false the constructor sets *this to the end-of-sequence iterator.
Change [re.regiter.deref] p2 as indicated:
const value_type* operator->() const;-2- Returns:
&addressof(match).
Change [thread.lock.guard] p2-7 as indicated:
explicit lock_guard(mutex_type& m);-2- Requires: If mutex_type is not a recursive mutex, the calling thread does not own the mutex m.
-3- Effects:As if byInitializes pm with m. Calls m.lock().-4- Postconditions: &pm == &mlock_guard(mutex_type& m, adopt_lock_t);-5- Requires: The calling thread owns the mutex m.
-6-Postconditions: &pm == &mEffects: Initializes pm with m. -7- Throws: Nothing.
[ 2018-11, Adopted in San Diego ]
[ 2018-07-20 Status to Tentatively Ready after five positive votes on the reflector. ]
Some additional instances where the library specification applies unary operator & when it should use addressof.
History | |||
---|---|---|---|
Date | User | Action | Args |
2021-02-25 10:48:01 | admin | set | status: wp -> c++20 |
2018-11-12 04:39:29 | admin | set | messages: + msg10200 |
2018-11-12 04:39:29 | admin | set | status: voting -> wp |
2018-10-08 05:13:59 | admin | set | status: ready -> voting |
2018-07-20 21:06:57 | admin | set | messages: + msg10038 |
2018-07-20 21:06:57 | admin | set | status: new -> ready |
2018-06-30 09:24:49 | admin | set | messages: + msg10006 |
2018-06-30 00:00:00 | admin | create |