Hi,
cppcheck reports an mismatchingContainerExpression warning for the following code. Seems like false positive to me. I've tested locally on 2.12.1 and online demo (which is 2.10 - http://cppcheck.net/demo/). Currently I am unable to verify it on newest version. Perhaps you could check on 2.17 and if it is still reproducible then create ticket for it :) Similar issue was already reported here: https://trac.cppcheck.net/ticket/10012#ticket
input.cpp:27:19: warning: Iterators to containers from different expressions 'vec1.front()' and 'vec2.front()' are used together. [mismatchingContainerExpression]
if (vec1.front().begin() == vec2.front().end())
^
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
cppcheck reports an mismatchingContainerExpression warning for the following code. Seems like false positive to me. I've tested locally on 2.12.1 and online demo (which is 2.10 - http://cppcheck.net/demo/). Currently I am unable to verify it on newest version. Perhaps you could check on 2.17 and if it is still reproducible then create ticket for it :) Similar issue was already reported here: https://trac.cppcheck.net/ticket/10012#ticket
Thanks in advance.
I can't reproduce this with current head.
The issue was fixed in 2.7 and the fix has been bisected to https://github.com/danmar/cppcheck/commit/57f5b19b343a2921abe80e0060d71a30246b7bde.