Skip to content

Commit

Permalink
Try another fix
Browse files Browse the repository at this point in the history
  • Loading branch information
arximboldi committed Jul 11, 2022
1 parent 3d4687e commit 8017ce1
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions lager/effect.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,6 @@ lager::effect<lager::actions<...>, ...> " //
effect& operator=(const effect&) = default;
effect& operator=(effect&&) = default;

effect(base_t&& base)
: base_t{std::move(base)}
{}
effect(base_t const& base)
: base_t{base}
{}

template <typename A2,
typename D2,
std::enable_if_t<detail::are_compatible_actions_v<A2, Action> &&
Expand All @@ -74,6 +67,17 @@ lager::effect<lager::actions<...>, ...> " //
return {};
}}
{}

template <
typename Fn,
std::enable_if_t<
!std::is_same_v<std::decay_t<Fn>, effect> &&
std::is_same_v<future,
std::invoke_result_t<Fn&, const context_t&>>,
int> = 0>
effect(Fn&& fn)
: base_t{std::forward<Fn>(fn)}
{}
};

/*!
Expand Down

0 comments on commit 8017ce1

Please sign in to comment.