Skip to content

Commit 35d22a4

Browse files
JunielKatarnasklar
andcommitted
[0.68] MustBeNoExceptVoidFunctor should depend on the template type parameter to avoid being evaluated too early (microsoft#9609)
* MustBeNoExceptVoidFunctor should depend on the template type parameter to avoid being evaluated too early (microsoft#9562) * MustBeNoExceptVoidFunctor should depend on the template type parameter to avoid being evaluated too early * Change files * Change files Co-authored-by: Alexander Sklar <asklar@microsoft.com>
1 parent 6c36bf3 commit 35d22a4

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "prerelease",
3+
"comment": "MustBeNoExceptVoidFunctor should depend on the template type parameter to avoid being evaluated too early (#9562)",
4+
"packageName": "react-native-windows",
5+
"email": "julio.rocha@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}

vnext/Mso/dispatchQueue/dispatchQueue.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,9 +723,14 @@ inline DispatchTaskImpl<TInvoke, TOnCancel>::~DispatchTaskImpl() noexcept {
723723
}
724724
}
725725

726+
namespace details {
727+
template <typename>
728+
constexpr bool always_false = false;
729+
}
730+
726731
template <typename T>
727732
inline void MustBeNoExceptVoidFunctor() {
728-
static_assert(false, __FUNCTION__ ": not a noexcept callable functor returning void");
733+
static_assert(details::always_false<T>, __FUNCTION__ ": not a noexcept callable functor returning void");
729734
}
730735

731736
template <typename TInvoke, typename TOnCancel>

0 commit comments

Comments
 (0)