Minimum working example.
#include <vector> #include <boost/foreach.hpp> namespace { struct Test {}; } void Test2(std::vector<Test>& first, std::vector<Test*>& second) { BOOST_FOREACH(Test& test, first) { second.push_back(boost::addressof<Test>(test)); } }
Cppcheck output: style/constParameter: Parameter 'first' can be declared with const
Please try --library=boost.
--library=boost
Log in to post a comment.
Minimum working example.
Cppcheck output:
style/constParameter: Parameter 'first' can be declared with const
Please try
--library=boost.