boost lambda with proxy reference object
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
participants (1)
-
Nathan Thomas