Skip to content

Commit a6d8d30

Browse files
committed
Making TemporaryCallback stricter, but still possible to construct as a value, which should be banned for safety.
1 parent b3bd56f commit a6d8d30

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Source/DFPSR/base/TemporaryCallback.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ class TemporaryCallback<RESULT(ARGS...)> {
7070
return (*(F*)closure)(std::forward<ARGS>(args)...);
7171
};
7272
}
73+
74+
// No default constructor.
75+
TemporaryCallback() = delete;
7376
// No copy construction, only pass it by reference from input arguments.
7477
TemporaryCallback(const TemporaryCallback &other) = delete;
7578
// No move construction, only pass it by reference from input arguments.

0 commit comments

Comments
 (0)