Boost logo

Boost Users :

From: Scott Meyers (usenet_at_[hidden])
Date: 2007-03-29 12:30:53


Hendrik Belitz wrote:
> I'd like to address a problem I just encountered on using mpl::for_each
> (Boost 1.33). Similar to Scott, I implemented a stateful functor that should
> be called for all types in a mpl::vector<>. for_each is no option, since it
> passes the functor by value

I slapped a boost::ref around the functor, and that worked fine for me. I
suggest you try the same thing and see if that works for you.

Scott


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