Created on 2014-10-01.00:00:00 last changed 89 months ago
Proposed resolution:
This wording is relative to N3936.
Change [specialized.algorithms] p1 as depicted:
-1-
All the iterators that are used as formal template parameters in the following algorithms are required to have their operator* return an object for which operator& is defined and returns a pointer to T.In the algorithm uninitialized_copy, the formal template parameter InputIterator is required to satisfy the requirements of an input iterator (24.2.3). In all of the following algorithms, the formal template parameter ForwardIterator is required to satisfy the requirements of a forward iterator (24.2.5), and is required to have the property that no exceptions are thrown from increment, assignment, comparison, or indirection through valid iterators. In the following algorithms, if an exception is thrown there are no effects.
Change [uninitialized.copy] p1 as depicted:
-1- Effects:
for (; first != last; ++result, ++first) ::new (static_cast<void*>(addressof(&*result))) typename iterator_traits<ForwardIterator>::value_type(*first);
Change [uninitialized.copy] p3 as depicted:
-3- Effects:
for (; n > 0; ++result, ++first, --n) { ::new (static_cast<void*>(addressof(&*result))) typename iterator_traits<ForwardIterator>::value_type(*first); }
Change [uninitialized.fill] p1 as depicted:
-1- Effects:
for (; first != last; ++first) ::new (static_cast<void*>(addressof(&*first))) typename iterator_traits<ForwardIterator>::value_type(x);
Change [uninitialized.fill.n] p1 as depicted:
-1- Effects:
for (; n--; ++first) ::new (static_cast<void*>(addressof(&*first))) typename iterator_traits<ForwardIterator>::value_type(x); return first;
[ Urbana 2014-11-07: Move to Ready ]
This restriction isn't necessary anymore. In fact, this is the section that defines addressof().
(Editorial note: We can depict these algorithms as calling addressof() instead of std::addressof() thanks to [contents]/3 "Whenever a name x defined in the standard library is mentioned, the name x is assumed to be fully qualified as ::std::x, unless explicitly described otherwise.")
History | |||
---|---|---|---|
Date | User | Action | Args |
2017-07-30 20:15:43 | admin | set | status: wp -> c++17 |
2015-05-22 18:31:21 | admin | set | status: ready -> wp |
2014-11-08 16:43:57 | admin | set | messages: + msg7180 |
2014-11-08 16:43:57 | admin | set | status: new -> ready |
2014-10-07 19:24:34 | admin | set | messages: + msg7125 |
2014-10-01 00:00:00 | admin | create |