I recently made my first libstdc++ commit in two years, as I no longer work for a company that maintains its own non-standard C++ Standard Library and that makes it difficult to do open-source work.
When I get the time I'll finish some optimisations to shared_ptr, removing redundant memory barriers and synchronised atomic operations when they're not needed. This necessitated reading more about relaxed memory-ordering and the latest threads and memory model for C++ proposals. More of it makes sense than it did last time I read them, so either the proposals are clearer or I'm starting to get it ... probably the former.
One of my aims is to allow you to use a non-threadsafe shared_ptr in multi-threaded programs. This is useful when you want the benefits of shared_ptr but you know certain objects are never shared between threads, so fully-fenced atomic operations are unnecessarily expensive. Ideally I'd like to say something like __gnu_cxx::shared_ptr_unlocked<T>, which is less ugly than __gnu_cxx::__shared_ptr<T, __gnu_cxx::_S_single>.
Lazy web, can you suggest a better name than shared_ptr_unlocked?
