I already asked the question. I am wondering if there is any solution for this using boost::for_each and boost::bind.
The question has been already answered, that's why I created another issue here; only for the curiosity. Thanks.
Yes, you can use boost::bind
to create a suitable functor, with a placeholder for the functor's parameter:
for_each(oldpnTs.begin(), oldpnTs.end(), bind(typeDetection, _1, ALL, *this));
In modern C++, I'd prefer a new-style loop
for (pnt & p : oldpnTs) {
typeDetection(p, ALL, *this);
}