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>
281
281
\indexlibraryglobal{exchange}%
282
282
\begin{itemdecl}
283
283
template<class T, class U = T>
284
- constexpr T exchange(T& obj, U&& new_val);
284
+ constexpr T exchange(T& obj, U&& new_val) noexcept(@\seebelow@) ;
285
285
\end{itemdecl}
286
286
287
287
\begin{itemdescr}
293
293
obj = std::forward<U>(new_val);
294
294
return old_val;
295
295
\end{codeblock}
296
+
297
+ \pnum
298
+ \remarks
299
+ The exception specification is equivalent to:
300
+ \begin{codeblock}
301
+ is_nothrow_move_constructible_v<T> && is_nothrow_assignable_v<T&, U>
302
+ \end{codeblock}
296
303
\end{itemdescr}
297
304
298
305
You can’t perform that action at this time.
0 commit comments