diff --git a/lib/templatesimplifier.cpp b/lib/templatesimplifier.cpp index 9a50047fd..ae17b1a0f 100644 --- a/lib/templatesimplifier.cpp +++ b/lib/templatesimplifier.cpp @@ -340,7 +340,7 @@ std::set TemplateSimplifier::expandSpecialized(Token *tokens) { std::ostringstream ostr; const Token *tok3 = tok2; - for (; tok3 && tok3->str() == ">"; tok3 = tok3->next()) { + for (; tok3 && tok3->str() != ">"; tok3 = tok3->next()) { if (tok3 != tok2) ostr << " "; ostr << tok3->str();