Open
Description
Needs a check that will find std::min
and std::max
invocations without surrounding parentheses over the name. The check will suggest to insert parentheses around the name.
BEFORE:
int result = std::min(a, b);
AFTER:
int result = (std::min)(a, b);
Without parentheses the code that uses std::min
and std::max
might lead to compilation error in MSVC:
#include <algorithm> // std::min
#include <windows.h> // min macro
int main() {
int a = 5, b = 10;
// Compilation error in MSVC:
// "error C2589: '(': illegal token on right side of '::'"
int result = std::min(a, b);
return 0;
}