With gcc 14 some C++ Standard Library headers have been changed to no longer include other headers that were being used internally by the library. In logiops's case it is the <algorithm> header.
Downstream Gentoo bug:
https://bugs.gentoo.org/917002
GCC 14 porting guide:
https://gcc.gnu.org/gcc-14/porting_to.html
Signed-off-by: Kostadin Shishmanov <kocelfc@tutanota.com>