From d7473cab8cd4784baf5968b35689b9b61a61028f Mon Sep 17 00:00:00 2001 From: fwingerter-Ocient <66263689+fwingerter-Ocient@users.noreply.github.com> Date: Tue, 10 Nov 2020 12:22:08 -0500 Subject: [PATCH] Handle static_assert if standard is at least C++11 (#2842) Previously it was being handled only if the standard was *exactly* C++11. --- lib/checkother.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/checkother.cpp b/lib/checkother.cpp index dcf509484..ef20bc3a2 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -2136,7 +2136,7 @@ void CheckOther::checkDuplicateExpression() if (assignment && warningEnabled) selfAssignmentError(tok, tok->astOperand1()->expressionString()); else if (styleEnabled) { - if (mTokenizer->isCPP() && mSettings->standards.cpp==Standards::CPP11 && tok->str() == "==") { + if (mTokenizer->isCPP() && mSettings->standards.cpp >= Standards::CPP11 && tok->str() == "==") { const Token* parent = tok->astParent(); while (parent && parent->astParent()) { parent = parent->astParent();