Commit d02e4173 authored by Dominik Charousset's avatar Dominik Charousset

Fix build on MSVC

parent f46e717b
...@@ -60,12 +60,10 @@ public: ...@@ -60,12 +60,10 @@ public:
template <class... Ts> template <class... Ts>
explicit stateful_actor(actor_config& cfg, Ts&&... xs) : super(cfg) { explicit stateful_actor(actor_config& cfg, Ts&&... xs) : super(cfg) {
using pointer = stateful_actor*; if constexpr (std::is_constructible<State, Ts&&...>::value)
if constexpr (std::is_constructible<State, pointer, Ts&&...>::value) {
new (&state) State(this, std::forward<Ts>(xs)...);
} else {
new (&state) State(std::forward<Ts>(xs)...); new (&state) State(std::forward<Ts>(xs)...);
} else
new (&state) State(this, std::forward<Ts>(xs)...);
} }
~stateful_actor() override { ~stateful_actor() override {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment