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

Compile warning #2

Open
mxwendler opened this issue Mar 25, 2023 · 1 comment
Open

Compile warning #2

mxwendler opened this issue Mar 25, 2023 · 1 comment

Comments

@mxwendler
Copy link

Hi there, thank you very much for this powerful, simple and impressively compact library! Just a minor issue, we get compile warnings under clang 14:

/xxx/libs/cpp/threadpool/threadpool.hpp:177:28: warning: explicitly defaulted move assignment operator is implicitly deleted [-Wdefaulted-function-deleted]
            DispatchGroup& operator = (DispatchGroup&& DP) = default;
                           ^
/xxx/libs/cpp/threadpool/threadpool.hpp:240:31: note: move assignment operator of 'DispatchGroup' is implicitly deleted because field '_closed' has a deleted move assignment operator
            std::atomic<bool> _closed;
                              ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/atomic:73:13: note: 'operator=' has been explicitly marked deleted here
    atomic& operator=(const atomic&) = delete;

So to my understanding we could simply remove the move operator from the default assignment:

- DispatchGroup& operator = (DispatchGroup&& DP) = default;
------
+ DispatchGroup& operator = default;

Best wishes

@alice-viola
Copy link
Owner

Hi! Thanks for your feedback, please, feel free to open a pull request with this mod and I will merge it in the master branch!

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