https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78991
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- How positive you are that this is a libstdc++ bug rather than a clang bug? It works correctly with GCC 5.4.0's front-end and GCC 7.0's libstdc++ and front-end.