Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Excellent advice here. I'm fairly confident about my use of relaxed memory order. The effects of the chosen operations never reach outside of other synchronized operations because their original state is restored before returning to the caller. I haven't used forwarding (C++11 is still kinda new to me) or swap much before. I'll try to remember the correct way! I agree with you regarding memory ordering requiring a certain level of guru-ness. I figure I have to do it wrong a bit before I'll get there. This was my first attempt. :) Thanks for your incredible insights!
Also, regarding the lambda. I'm thinking that the object construction that goes on in the background might be a slight performance hit. Any insights on this?