Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "MustBeNoExceptVoidFunctor should depend on the template type parameter to avoid being evaluated too early (#9609)",
"packageName": "react-native-windows",
"email": "asklar@microsoft.com",
"dependentChangeType": "patch"
}
7 changes: 6 additions & 1 deletion vnext/Mso/dispatchQueue/dispatchQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -723,9 +723,14 @@ inline DispatchTaskImpl<TInvoke, TOnCancel>::~DispatchTaskImpl() noexcept {
}
}

namespace details {
template <typename>
constexpr bool always_false = false;
}

template <typename T>
inline void MustBeNoExceptVoidFunctor() {
static_assert(false, __FUNCTION__ ": not a noexcept callable functor returning void");
static_assert(details::always_false<T>, __FUNCTION__ ": not a noexcept callable functor returning void");
}

template <typename TInvoke, typename TOnCancel>
Expand Down