cppcheck
cppcheck copied to clipboard
Fix handling of std::optional, operator* might be non const
Fix handling of std::optional, operator* might be non const
Also, there was an issue in detecting string iterators, the detection was relying on the container being templates, using the '>' as part of the pattern, which is not the case with std::string for instance.
Without any change, TestSymbolDatabase::iterator would fail, while
TestSymbolDatabase::iterator2 (which is the same thing but with auto
instead of std::string::const_iterator) would succeed.
The changes in Library::detectContainer are a bit of a hack, I'm not very proud of them...