File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -11167,13 +11167,20 @@
11167
11167
11168
11168
\pnum
11169
11169
Some algorithms specified in \ref {specialized.algorithms }
11170
- make use of the exposition-only function template
11171
- \tcode {\placeholdernc {voidify}}:
11170
+ make use of the following exposition-only function templates:
11172
11171
\begin {codeblock }
11173
11172
template<class T>
11174
11173
constexpr void* @\placeholdernc {voidify}@(T& obj) noexcept {
11175
11174
return addressof(obj);
11176
11175
}
11176
+
11177
+ template<class I>
11178
+ decltype(auto) @\exposid {deref-move}@(I& it) {
11179
+ if constexpr (is_lvalue_reference_v<decltype(*it)>)
11180
+ return std::move(*it);
11181
+ else
11182
+ return *it;
11183
+ }
11177
11184
\end {codeblock }
11178
11185
11179
11186
\rSec 2[special.mem.concepts]{Special memory concepts}
11550
11557
\begin {codeblock }
11551
11558
for (; first != last; (void)++result, ++first)
11552
11559
::new (@\placeholdernc {voidify}@(*result))
11553
- typename iterator_traits<NoThrowForwardIterator>::value_type(std:: move(* first));
11560
+ typename iterator_traits<NoThrowForwardIterator>::value_type(@ \exposid {deref- move}@( first));
11554
11561
return result;
11555
11562
\end {codeblock }
11556
11563
\end {itemdescr }
11610
11617
\begin {codeblock }
11611
11618
for (; n > 0; ++result, (void) ++first, --n)
11612
11619
::new (@\placeholdernc {voidify}@(*result))
11613
- typename iterator_traits<NoThrowForwardIterator>::value_type(std:: move(* first));
11620
+ typename iterator_traits<NoThrowForwardIterator>::value_type(@ \exposid {deref- move}@( first));
11614
11621
return {first, result};
11615
11622
\end {codeblock }
11616
11623
\end {itemdescr }
You can’t perform that action at this time.
0 commit comments