Skip to content

Compile warning #2

Description

@mxwendler

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions