diff --git a/lager/config.hpp b/lager/config.hpp index 18419091..9c2a88c1 100644 --- a/lager/config.hpp +++ b/lager/config.hpp @@ -16,6 +16,10 @@ #define LAGER_HAS_CPP17 1 #endif +#if defined(_MSC_VER) && !defined(LAGER_DISABLE_STORE_DEPENDENCY_CHECKS) +#define LAGER_DISABLE_STORE_DEPENDENCY_CHECKS +#endif + #ifdef __has_feature #if !__has_feature(cxx_exceptions) #define LAGER_NO_EXCEPTIONS diff --git a/lager/store.hpp b/lager/store.hpp index 6af905a4..f0d649c9 100644 --- a/lager/store.hpp +++ b/lager/store.hpp @@ -169,8 +169,9 @@ class store base_t::send_down(); base_t::notify(); } + auto& ctxMsvcWorkaround = ctx; if constexpr (std::is_same_v) { + decltype(eff(ctxMsvcWorkaround))>) { eff(ctx); if constexpr (has_futures) p();