Last active
March 1, 2016 15:11
-
-
Save ltroska/e65c21462327ea16fe52 to your computer and use it in GitHub Desktop.
compilation error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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