|
Boost Users : |
From: Nathan Thomas (nthomas_at_[hidden])
Date: 2006-07-26 18:11:16
Hi all,
I'm trying to use boost lambda to aggregate several functor calls
together in one pass over my data with a std::for_each(..) (using bind
and the lambda comma operator).
I'm running into problems because I use an iterator (over type T) where
the dereference operator doesn't return a T& but instead an object of
type proxy<T>. This proxy class handles marshaling the object from
another address space & setting up a temporary copy on its construction
and subsequently writes back on destruction.
Lambda expects (as it should) a T& from the deference attempt to invoke
functors which are set to expect the proxy type. Is there a template I
can specialize for this case or some type I could but am not reflecting
out of my iterator class to make this work. Or is there better way to
write this iterator that would allow me to properly pass a T& while
still allowing some pre & post processing on the dereference?
Thanks for you time / help,
--Nathan Thomas
Texas A&M University
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