Hi,
I would like to accomplish the following: "bind a functor to a reference and
compose this with another functor". Ultimately I would like to use this
composition with the reference embedded in it.
If I write it like this:
functor_type h = bind(f, bind(g, ref(b)));
it works alright. However, in my situation the binding of g is done somewhere
else in the program, so have:
functor_type temp = bind(g, ref(b));
...
functor_type h = bind(f, temp);
Sadly enough this does not appear to work. I don't have a reference to b in h().
I'm sure bind works the way it was intended. I'm more interested in whether you
guys now how to achieve the effect I'm trying to achieve?
Much appreciated,
Pieter.
Some additional context:
using namespace boost;
typedef function