Open tnovotny opened 8 years ago
for some data structures this is by design (the queue
requires a trivial assignment operator) for the other data structures, patches are more than welcome
I patched spsc_queue so that it works for me. I posted about this in the boost mailing list here: getting a move only type into spsc_queue.
In the meantime I forked the repository and have a better implementation that uses std::enable_if. The main "issue" is the "detail\copy_payload.hpp" which is used by serveral implementaions so I'm hesitant to change it.
i'm not reading the boost-user list. but you could do a PR and we could discuss it there
I'll tidy the stuff up a little a locally, push it, and then do a PR.
@timblechmann any news on that ? Thanks !
@cor3ntin I made the pull request minimal changes to allow single move only values to be pushed and poped #27 on Aug 3, 2016 and have received no feedback.
thanks for the heads-up.
from the 3 PRs #31 looks best and i'm commenting on this. i only have limited time atm to work on this and no real use-case for move semantics, so it would be great if you guys could pick up that pr and complete it
@timblechmann But they do different things. This one works with move-only types such as unique_ptr
where as the other simply does some optimizations for move-able types. #31 but fails on move-only types.
i don't care too much, which implementation should go in, as long as it's still c++98 compatible, has test coverage and supports both moveable and move-only types :)
It is currently not possible to get a move only type into the lockfree datastructures. It leades to compile errors.