 }
 
 
-inline agency::cuda::future<void>
+inline __host__ __device__
+agency::cuda::future<void>
   move_construct_result(agency::cuda::detail::event& dependency)
 {
   return agency::cuda::future<void>(std::move(dependency), agency::cuda::detail::asynchronous_state<void>(agency::cuda::detail::construct_not_ready));



template<class Pointer, class... Pointers>
agency::cuda::future<
  agency::detail::when_all_result_t<
    agency::cuda::future<

using when_all_execute_result_t = typename when_all_execute_result<TupleOfFutures>::type;


template<class Function, class Shape, class TupleOfFutures, class OuterFactory, class InnerFactory>
agency::cuda::future<
  when_all_execute_result_t<
    typename std::decay<TupleOfFutures>::type
  >
>
  when_all_execute(Function f, Shape shape, TupleOfFutures&& futures, OuterFactory outer_factory, InnerFactory inner_factory)
{
  auto indices = agency::detail::make_tuple_indices(futures);
  return ::when_all_execute_and_select_impl(indices, indices, f, shape, std::move(futures), outer_factory, inner_factory);
