Analysis error with unordered maps

Answered

Code analysis reports an error when using an unordered map with int keys and values:

The code compiles and runs correctly., but code analysis incorrectly reports a problem with comparing the iterator returned by find() to end().

The issue seems to be related to the type parameters.  The example in the documentation page for find does not cause the issue  (http://www.cplusplus.com/reference/unordered_map/unordered_map/find/ ). 

0
3 comments

Hi! We have a related issue in our tracker: https://youtrack.jetbrains.com/issue/CPP-10947. Please follow it to get updates.

0
Avatar
Permanently deleted user

Thanks for the update.   Incidentally, I tried the latest EAP version and that's actually made it worse.   That version reports two errors - that find() and end() are unknown functions. 

0

Thanks for the info. I've passed the information to the developers.

0

Please sign in to leave a comment.