https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117736
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Reducing. Note the preprocessed source does not work on the trunk but that is due to an incompatibility with the older libstdc++ part rather than your code I think.