This is a bit more robust than that in egcs 1.1.1, and recognizes more (but not yet all) template constructions.