Skip to content

Commit af4c194

Browse files
committed
Making (currently unused) operator= on BlockWithCallable only defined if exception safe
1 parent 772b274 commit af4c194

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

include/objc-helpers/BlockUtil.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ namespace BlockUtil
204204
}
205205

206206
BlockWithCallable & operator=(const BlockWithCallable & src)
207-
requires(std::is_copy_constructible_v<Callable>) {
207+
requires(std::is_nothrow_copy_constructible_v<Callable>) {
208208
if (this != &src) {
209209
disposeBlock(this);
210210
reallyCopyBlock(this, &src);
@@ -213,7 +213,7 @@ namespace BlockUtil
213213
}
214214

215215
BlockWithCallable & operator=(BlockWithCallable && src)
216-
requires(std::is_move_constructible_v<Callable>) {
216+
requires(std::is_nothrow_move_constructible_v<Callable>) {
217217
if (this != &src) {
218218
disposeBlock(this);
219219
moveBlock(this, &src);

0 commit comments

Comments
 (0)