Skip to content

Instantly share code, notes, and snippets.

@ltroska
Last active March 1, 2016 15:11
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 ltroska/e65c21462327ea16fe52 to your computer and use it in GitHub Desktop.
Save ltroska/e65c21462327ea16fe52 to your computer and use it in GitHub Desktop.
compilation error
// Copyright (c) 2016 Lukas Troska
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// This demonstrated the compilation error when using an action that returns a
// future inside dataflow (issue #2008)
#include <hpx/hpx_init.hpp>
#include <hpx/hpx.hpp>
hpx::future<double> foo()
{
return hpx::make_ready_future(0.);
}
HPX_DEFINE_PLAIN_ACTION(foo);
int hpx_main(int argc, char* argv[])
{
hpx::dataflow(foo_action(), hpx::find_here());
return hpx::finalize();
}
int main(int argc, char* argv[])
{
return hpx::init(argc, argv);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment