https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113960
--- Comment #12 from mfarca <miladfarca at gmail dot com> --- I've applied the above patch directly to `/usr/include/c++/12/bits/stl_algobase.h` under my fedora 36 env with gcc 12.2.1 and it solved the problem.