Summary: | don't warn about strict iterator mismatch in const function | ||
---|---|---|---|
Product: | [Developer tools] clazy | Reporter: | Milian Wolff <mail> |
Component: | general | Assignee: | Unassigned bugs mailing-list <unassigned-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | smartins |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/clazy/145e7b6578e690f1aacc250e0cadb8fcfdbb281e | Version Fixed In: | |
Sentry Crash Report: |
Description
Milian Wolff
2019-02-14 09:00:07 UTC
even adding an explicit static_cast<> to const_iterator warns: warning: Mixing iterators with const_iterators [-Wclazy-strict-iterators] return static_cast<decltype(mFoo)::const_iterator>(mFooIt) != mFoo.end(); Git commit 145e7b6578e690f1aacc250e0cadb8fcfdbb281e by Sergio Martins. Committed on 15/02/2019 at 18:45. Pushed by smartins into branch 'master'. strict-iterators: Don't warn when comparing against an iterator member var It won't detach the container M +17 -0 src/checks/level0/strict-iterators.cpp M +11 -0 tests/strict-iterators/main.cpp https://commits.kde.org/clazy/145e7b6578e690f1aacc250e0cadb8fcfdbb281e |