https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113841
--- Comment #9 from Viktor Ostashevskyi <ostash at ostash dot kiev.ua> --- (In reply to Jonathan Wakely from comment #8) > Calling swap unqualified performs ADL, which has to find all the associated > namespaces and associated classes. To do that it has to complete all the > types involved, which means it tries to complete: > std::hash<std::pair<const int, MyArrVec>*> > std::pair<const int, MyArrVec> > MyArrVec > MyVec > MyAllocator<int> > > Trying to complete MyVec hits an error outside the immediate context, > because its default constructor cannot be instantiated, because > MyAllocator<int> is not default constructible. > > That's why comment 5 fixes it. Thanks a lot for such a deep explanation. We applied patch from comment #5 to gcc-13 and now clang-17 can compile our application using libstdc++. Any plans to apply the patch to gcc-12/gcc-13/gcc-14/trunk?