418090 (1) [Avatar] Offline
In the pop() function that returns a shared_ptr, a new, local shared_ptr is created as const. This prevents the object from being moved upon upon return (ie. now copied). This is not a problem, but it increments and decrements the shared_ptr atomic counter. Is there a particular (multi threading related) reason for this copy instead of move ?

Colin (11) [Avatar] Offline
const modifier only prevents explicit move using std::move, implicit move as used by RVO is still allowed.