
Hello, I'm currently trying to write some transforms but I think I horribly fail because I must be missing an important point. Let's say we have a grammar defined as : struct skeleton : or_< terminal< bp::_ > , bitwise_and<skeleton,skeleton> > {}; What I need to do is build a type out of a given expression. This type is in fact a structure containing a tuple of class that represents MPI process. So my idea was to write transform that do the following : * for terminals, extract the argument (which is in fact a functor class) and create a process network class instanciation with the argument and a PID (basically a mpl::long_<>). * for the & operator, transform the left and right argument, and build the tuple out of both results by merging the contents of both into a unique process network. My biggest concern is to have the PID value to be kept across transform call and correctly increased for each terminal. To do so, am I forced to use fold (or fold_tree cause in the real code I have more than the sole & operator) or is there a simple way to say transform left and right and get the resulting types ? Then, how is State kept through fold_tree or transform iteration ? Should I kept the PID current value in an external parameters ? Thanks in advance. PS : if more detailed code is needed, I'll try to see what can be publicly dispatched here.