Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is_executor template specification fails for inherited executors #1691

Closed
dcbdan opened this issue Jul 29, 2015 · 1 comment
Closed

is_executor template specification fails for inherited executors #1691

dcbdan opened this issue Jul 29, 2015 · 1 comment

Comments

@dcbdan
Copy link
Contributor

dcbdan commented Jul 29, 2015

#include <hpx/config.hpp>
#include <hpx/hpx.hpp>
#include <hpx/hpx_start.hpp>

#include <hpx/include/parallel_executors.hpp>
#include <hpx/include/parallel_algorithm.hpp>

struct my_executor : hpx::parallel::parallel_executor
{};

////////////////////////////////////////////////////////////////////////////////
/* This will only compile if below is uncommented */

//namespace hpx { namespace parallel { HPX_INLINE_NAMESPACE(v3) { namespace detail
//{
//    template <>
//    struct is_executor<my_executor>
//        : std::true_type
//    {};
//}}}}

////////////////////////////////////////////////////////////////////////////////

int hpx_main(int argc, char* argv[])
{
    using hpx::parallel::for_each;
    using hpx::parallel::par;

    my_executor exec;

    std::vector<int> v(100);

    for_each(par.on(exec), v.begin(), v.end(), [](int x){ });

    return hpx::finalize();
}

int main(int argc, char* argv[])
{
    hpx::start(argc, argv);
    return hpx::stop();
}
@hkaiser hkaiser added this to the 0.9.11 milestone Jul 29, 2015
hkaiser added a commit that referenced this issue Jul 29, 2015
…cutors

- types derived from parallel::executor_tag are treated as executors by default
@hkaiser
Copy link
Member

hkaiser commented Jul 30, 2015

@dcbdan Please see #1693. Does this solve your issue?

@hkaiser hkaiser closed this as completed in a7094c6 Aug 1, 2015
hkaiser added a commit that referenced this issue Aug 1, 2015
Fix #1691: is_executor template specification fails for inherited executors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants