https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108645
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- >Tested with both clang and gcc trunk, so it seems to be a library level issue. I tested clang with -stdlib=libc++ and it produces the same results as without that option (which is it uses gcc's libstdc++v3) so it might not be a library level issue. https://godbolt.org/z/1qhjMKWhG