Skip to content

Instantly share code, notes, and snippets.

@sithhell
Created January 29, 2018 10:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sithhell/bf32d7239f5e1c0344bc154181df560d to your computer and use it in GitHub Desktop.
Save sithhell/bf32d7239f5e1c0344bc154181df560d to your computer and use it in GitHub Desktop.
diff --git a/hpx/lcos/detail/future_transforms.hpp b/hpx/lcos/detail/future_transforms.hpp
index 0ff8f2a..16ae86b 100644
--- a/hpx/lcos/detail/future_transforms.hpp
+++ b/hpx/lcos/detail/future_transforms.hpp
@@ -30,7 +30,7 @@ namespace lcos {
typename std::decay<T>::type>::value>::type* = nullptr>
bool async_visit_future(T&& current)
{
- auto state =
+ auto& state =
traits::detail::get_shared_state(std::forward<T>(current));
if ((state.get() == nullptr) || state->is_ready())
@@ -51,7 +51,7 @@ namespace lcos {
typename std::decay<T>::type>::value>::type* = nullptr>
void async_detach_future(T&& current, N&& next)
{
- auto state =
+ auto& state =
traits::detail::get_shared_state(std::forward<T>(current));
// Attach a continuation to this future which will
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment