http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58839
--- Comment #2 from Andriy Lysnevych <mrlika at gmail dot com> --- Hi Paolo, You are right. It is not yours commit but next one. __r.get() returns T* and construction *__r.get() works for any type except the case when T=void. It causes dereferencing of void pointer that is prohibited by standard. When code creates unique_ptr<void> a resource hidden behind void pointer (most likely with custom deleter functionality) and then tries to pass it to shared_ptr<void>(unique_ptr<void>&&) constructor we get this void dereferencing error. Regards