Wednesday 15 July 2015

c++ - solving issue # C++98 Valid use of “for_each” in the code using Boost library 1.53 or 1.56 -



c++ - solving issue # C++98 Valid use of “for_each” in the code using Boost library 1.53 or 1.56 -

i asked question. wondering if there solution this using boost::for_each , boost::bind.

the question has been answered, that's why created issue here; curiosity. thanks.

yes, can utilize boost::bind create suitable functor, placeholder functor's parameter:

for_each(oldpnts.begin(), oldpnts.end(), bind(typedetection, _1, all, *this));

in modern c++, i'd prefer new-style loop

for (pnt & p : oldpnts) { typedetection(p, all, *this); }

c++ boost boost-bind boost-foreach

No comments:

Post a Comment