The following snippet shows a warning when using the detaching-member check: qSort( list.begin(), list..end(), valueLessThan ); There's no way of avoiding a detachment in this case, so ideally no warning would be shown.
Git commit 3e5888063b8bd4927971251c598423ccaf107a86 by Sergio Martins. Committed on 16/12/2015 at 23:11. Pushed by smartins into branch 'master'. detaching-member: Don't warn when passing to a function taking iterators qSort(list.begin(), list.end()) is fine. M +27 -0 checks/detachingmember.cpp M +6 -0 tests/detaching-member/main.cpp http://commits.kde.org/clazy/3e5888063b8bd4927971251c598423ccaf107a86