If I have an object that only allows move-only semantics - is it possible to move items from a set? I can't seem to find a way to do this.
No, it is not possible. There is no way to get non-const access to elements in a set, and move requires non-const references. Allowing non-const access would make it trivially easy to break the invariants for set.
set
1.4m articles
1.4m replys
5 comments
57.0k users