Closed valaxkong closed 4 years ago
std::function is not noexcept assignable: https://en.cppreference.com/w/cpp/utility/functional/function/operator%3D
You can make a custom one that is nonexcept movable. The functors destructor would have to be noexcept.
On Sun, May 10, 2020 at 8:21 AM valaxkong notifications@github.com wrote:
My Compiler is gcc 5.4. The static_assert is raised when compile this code : MPMCQueue<std::function<void()>> What did this happen? For my knowledge, std::function is no-throw move assignment, so it should not trigger the static_assert in your code.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rigtorp/MPMCQueue/issues/22, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABLO2Y74UWK2YHCMSGKSZ3RQ3A6XANCNFSM4M5JDYAQ .
My Compiler is gcc 5.4. The static_assert is raised when compile this code : MPMCQueue<std::function<void()>> What did this happen? For my knowledge, std::function is no-throw move assignment, so it should not trigger the static_assert in your code.