Skip to content

Commit

Permalink
MSVC: Fix for "ctx" not being found in store_node::dispatch
Browse files Browse the repository at this point in the history
There seems to be a bug with MSVC when evaluating `declspec(eff(ctx))` in the nested lambdas in store_node::dispatch.
  • Loading branch information
timpatt committed Nov 28, 2022
1 parent ed37dba commit e0090b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lager/store.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,9 @@ class store
base_t::send_down();
base_t::notify();
}
auto& ctxMsvcWorkaround = ctx;
if constexpr (std::is_same_v<void,
decltype(eff(ctx))>) {
decltype(eff(ctxMsvcWorkaround))>) {
eff(ctx);
if constexpr (has_futures)
p();
Expand Down

0 comments on commit e0090b3

Please sign in to comment.