Boost Users :
From: Edward Diener (eddielee_at_[hidden])
Date: 2004-04-06 22:23:56
I am lost, even after looking at the code, of what protect is supposed to do
in combination with boost::bind. I read this in the documentation,
"Sometimes it is necessary not to evaluate the first argument, but not to
evaluate some of the other arguments, even when they are nested bind
subexpressions. This can be achieved with the help of another function
object, protect, that masks the type so that bind does not recognize and
evaluate it. When called, protect simply forwards the argument list to the
other function object unmodified.
The header boost/bind/protect.hpp contains an implementation of protect. To
protect a bind function object from evaluation, use protect(bind(f, ...))."
but the grammar, or perhaps the explanation, eludes me. Can anyone explains
what it means to protect other arguments so that they are not evaluated in
the context of boost::bind, perhaps by a practical example, which I think
the doc could use, of what protect actually does ?
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net