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

Problem with std::packaged_task in c++17 #75

Open
Jamaika1 opened this issue Mar 8, 2021 · 2 comments
Open

Problem with std::packaged_task in c++17 #75

Jamaika1 opened this issue Mar 8, 2021 · 2 comments

Comments

@Jamaika1
Copy link

Jamaika1 commented Mar 8, 2021

I wanted to compile an htjpeg2000 grok which uses the ThreadPool library.
https://github.com/progschj/ThreadPool
I can't compile the save.

    auto task = std::make_shared< std::packaged_task<return_type()> >(
            std::bind(std::forward<F>(f), std::forward<Args>(args)...)
        );

or

    auto task = std::shared_ptr< std::packaged_task<return_type()> >(
                 new std::packaged_task<return_type()>(std::bind(std::forward<F>(f), std::forward<Args>(args)...))
        );
@nmcclatchey
Copy link
Contributor

Hi. The library does not currently implement std::packaged_task. Perhaps you would like to contribute an implementation?

@Jamaika1
Copy link
Author

Jamaika1 commented May 3, 2021

As much as I could, I modified it so that it could be used in GCC 11.0 / 12.0.
However, the plugin is not suitable for the latest C⁺⁺17 or higher codecs.
https://github.com/Jamaika1/mingw_std_threads

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants