On 10/25/2010 10:11 PM, joel.fal...@lri.fr wrote: >> or bundle it with the external transforms. >> All you need is a nested when template. Does that help? > > A short example of this for my poor 7am self without coffee ;) ?
struct my_actions_with_state { // specializations to look up transforms // using rules: template<typename Rule> struct when; // any ol' state can go here: int my_state; }; Now, you can pass an instance of my_actions_with_state as a data parameter. Proto will use the nested "when" template to find transforms, and your transforms can use the my_state member at runtime to do whatever. Does that help? -- Eric Niebler BoostPro Computing http://www.boostpro.com _______________________________________________ proto mailing list proto@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/proto