File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 52
52
53
53
// \ref{utility.exchange}, exchange
54
54
template<class T, class U = T>
55
- constexpr T exchange(T& obj, U&& new_val);
55
+ constexpr T exchange(T& obj, U&& new_val) noexcept(@\seebelow@) ;
56
56
57
57
// \ref{forward}, forward/move
58
58
template<class T>
263
263
\indexlibraryglobal{exchange}%
264
264
\begin{itemdecl}
265
265
template<class T, class U = T>
266
- constexpr T exchange(T& obj, U&& new_val);
266
+ constexpr T exchange(T& obj, U&& new_val) noexcept(@\seebelow@) ;
267
267
\end{itemdecl}
268
268
269
269
\begin{itemdescr}
275
275
obj = std::forward<U>(new_val);
276
276
return old_val;
277
277
\end{codeblock}
278
+
279
+ \pnum
280
+ \remarks
281
+ The exception specification is equivalent to:
282
+ \begin{codeblock}
283
+ is_nothrow_move_constructible_v<T> && is_nothrow_assignable_v<T&, U>
284
+ \end{codeblock}
278
285
\end{itemdescr}
279
286
280
287
You can’t perform that action at this time.
0 commit comments