Handle static_assert if standard is at least C++11 (#2842)

Previously it was being handled only if the standard was *exactly* C++11.
This commit is contained in:
fwingerter-Ocient 2020-11-10 12:22:08 -05:00 committed by GitHub
parent bd7e915c20
commit d7473cab8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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();