Fix event handling stack corruption on MSVC

This commit is contained in:
ZXShady 2024-07-21 19:36:14 +00:00 committed by Chris Thrasher
parent 27943ea774
commit 44339c3d67

View File

@ -39,6 +39,9 @@ template <typename... Ts>
struct OverloadSet : Ts...
{
using Ts::operator()...;
#if defined(_MSC_VER) && !defined(__clang__)
unsigned char dummy; // Dummy variable to ensure that this struct is not empty thus avoiding a crash due to an MSVC bug
#endif
};
template <typename... Ts>
OverloadSet(Ts...) -> OverloadSet<Ts...>;