Running cppcheck 2.13.0 on attached file there is report about knownConditionTrueFalse.
I think the report is wrong.
cppcheck --enable=warning,style,performance,portability,missingInclude --suppress=missingIncludeSystem cppcheck-typeid.cc
Checking cppcheck-typeid.cc ...
cppcheck-typeid.cc:14:18: style: Condition 'type==typeid(int)' is always false [knownConditionTrueFalse]
else if (type == typeid(int))
^
Running cppcheck 2.13.0 on attached file there is report about knownConditionTrueFalse.
I think the report is wrong.
cppcheck --enable=warning,style,performance,portability,missingInclude --suppress=missingIncludeSystem cppcheck-typeid.cc
Checking cppcheck-typeid.cc ...
cppcheck-typeid.cc:14:18: style: Condition 'type==typeid(int)' is always false [knownConditionTrueFalse]
else if (type == typeid(int))
^
Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/12340