https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109169
--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Take: type_info<T const>.can_convert_to<unstable_hash_value_t> The first part is dependent so when it goes to parse the next identifier, the parser does not know that can_convert_to is a template or not. So it thinks < is the less than operator rather than the start of a template argument. So the fix for the code is: type_info<T const>.template can_convert_to<unstable_hash_value_t> Which is the portable fix and even required by the standard to sign to the compiler the next identifier will start naming of a template.