std::wstring_convert and std::wbuffer_convert types are not copyable or movable, and store a plain pointer without a deleter. That means a much simpler type that just uses delete in its destructor can be used instead of std::unique_ptr. That avoids including and parsing all of in every header that includes . It also avoids instantiating unique_ptr and std::tuple> when the conversion utilities are used. Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * include/bits/locale_conv.h (__detail::_Scoped_ptr): Define new RAII class template. (wstring_convert, wbuffer_convert): Use __detail::_Scoped_ptr instead of unique_ptr. Tested powerpc64le-linux. Committed to trunk.