https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100465
--- Comment #1 from Ramchandra Apte <ramkapte at gmail dot com> --- (In reply to Ramchandra Apte from comment #0) > Created attachment 50771 [details] > Minimal example > > Adding an templated function overload for operator+= and including > <filesystem> causes a compilation error about conflicting overloads. The > code works on GCC versions <= 9.3 but does not work on GCC versions after > that. The code works on MSVC and Clang, so I believe this is a compiler bug. > I'm not sure, but I don't think the internal code of <filesystem> ought to > be seeing the overload in the global namespace. > > See attached error.cpp for minimal example. > > (Godbolt for error.cpp: https://godbolt.org/z/ccPvqf9K9 ) Note that the code works with Clang with libstdc++, so I believe this is a frontend bug.