How to store objects without copy or move constructor in std::vector?
For the start, std::mutex can not be copied or moved, therefore you are forced to use some kind of indirection. Since you want to store mutex in a vector, and not copy it, I would use std::unique_ptr. vector<unique_ptr<T>> does not allow certain vector operations (such as for_each) I am not sure I understand that sentence. … Read more