When I use nested if....else statement with
if (std::is_same<T, T1>::value)
{
// do something
}
else if (std::is_same<T, T2>::value)
{
// do something else
}
.
.
.
else
{
// print error
}
I get a QACPP static code analyzer's compiler warning qacpp-4.2.1-4090 with message "The condition in this 'if' statement is constant." How do I fix this compiler warning in gnu++11 standards ?
NOTE: I'm not an expert at C++ so please excuse me if the question sounds amateur.