|
Boost : |
From: Joel de Guzman (djowel_at_[hidden])
Date: 2005-06-03 06:02:29
Brian Braatz wrote:
> I am using the fusion code in 1.32 with the vc 71. compiler.
>
>
>
> My question is, considering the following unit test (for_each_tests.cpp)
[...]
> Why does the functor need to have a const operator()?
>
>
>
> I have been trying to take a tuple<> and touch each node in the tuple
> (ala for_each in fusion), which I was *very* happy to find fusion has
> this as working functionality.
>
>
>
> But, the next step for me is to have the functor write to its local
> member variables. I.e. requiring const here really limits the usefulness
> of the fusion::for_each.
>
>
>
> I look in my compilers header and noticed that stl::for_each does not
> have a const requirement on the functor.
>
>
>
> Is this a mistake? Is there a reason I am not seeing why for_each would
> have this limitation?
That's an oversight. It will be fixed immediately after 1.33.
I am working on Fusion now. Thanks for noticing!
Cheers,
-- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk