https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91067
--- Comment #11 from Viktor Ostashevskyi <ostash at ostash dot kiev.ua> --- I assume that problem comes from explicit instantiation: extern template class __shared_ptr<filesystem::_Dir>; which was added in c8fb3443911413cc88f316305fc6b7bf4861ccaa. It prevent Clang in emitting "C2" version of constructors on its own.